Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
EJ2 Grid, sacando la identificación de la fila

Estoy trabajando en una cuadrícula EJ2 y tengo una opción Editar y Eliminar. Con la cuadrícula EJ pasando el campo Id funcionó sin problemas con onClick. Lo mismo no funciona con EJ2 Grid.

 var grid = new ej.grids.Grid({ dataSource: @Html.Raw(JsonConvert.SerializeObject((Model), new JavaScriptDateTimeConverter())), allowExcelExport: true, allowPdfExport: true, toolbar: ['ExcelExport', 'PdfExport', 'CsvExport'], allowSelection: true, allowFiltering: true, allowSorting: true, //allowPaging: true, allowNumberFormatting: true, enableVirtualization: true, filterSettings: { type: 'Excel' }, selectionSettings: { persistSelection: true, type: "Multiple", checkboxOnly: true }, enableHover: false, enableHeaderFocus: true, height: 600, rowHeight: 38, columns: [ { field: "Id", visible: false, allowEditing: false }, { field: "Name", headerText: "Name", width: 100 }, { field: "ElectionDate", headerText: "ElectionDate", width: 80, format: "MM/dd/yyyy"}, { field: "RegistrationClose", headerText: "Registration Close", width: 80, format: "MM/dd/yyyy", }, { field: "RegularAbsenteeStart", headerText: "Absentee Start", width: 80, format: "MM/dd/yyyy"}, { field: "EarlyVotingStart", headerText: "Early Voting Start", width: 80, format: "MM/dd/yyyy"}, { field: "GraceVotingStart", headerText: "Grace Voting Start", width: 80, format: "MM/dd/yyyy",}, { field: "ElectionTypeName", headerText: "ElectionType", width: 110, }, { field: "Active", headerText: "Active", width: 70 }, { headerText: "", template: '<a href="#" onclick="Edit({{:Id}})">Edit</a>', width: 40, textAlign: "center" }, { headerText: "", template: '<a href="#" data-url="@Url.Action("Delete")/{{:Id}}" data-name="{{:Name}}" data-toggle="modal" data-target="#confirmModal">Delete</a>', width: 40, textAlign: "center" }, ], //pageSettings: { pageSizes: true, pageSize: 8 } }); grid.appendTo("#dataGrid_EJ2");
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

La plantilla cambió en EJ2. EJ era {{:Id}} EJ2 cambió a ${Id}

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda