Tengo un código de cuadrícula de datos EJ2 en Javascrpt. Tengo casillas de verificación para seleccionar de 1 a muchas filas. Al seleccionar una (s) fila (s), ¿cómo obtengo la "Id" de esas filas? A continuación se muestra mi definición de cuadrícula.
var grid = new ej.grids.Grid({ dataSource: @Html.Raw(JsonConvert.SerializeObject((Model), new JavaScriptDateTimeConverter())), allowExcelExport: true, allowTextWrap: true, allowPdfExport: true, toolbar: ['ExcelExport', 'PdfExport', 'CsvExport'], //editSettings: { allowDeleting: true }, allowSelection: true, allowFiltering: true, allowSorting: true, allowNumberFormatting: true, enableVirtualization: true, filterSettings: { type: 'Excel' }, selectionSettings: { persistSelection: true }, enableHover: true, enableHeaderFocus: true, height: 600, rowHeight: 38, allowPaging: true, columns: [ { type: 'checkbox', width: 10 }, { field: "Id", visible: false, isPrimaryKey: true}, { field: "RegistarName", headerText: "Registrar", width: 50,}, { field: "VoterStatus", headerText: "Voter Status", width: 50,}, { field: "strTrainedDate", headerText: "Trained", width: 50,}, { field: "strOathDate", headerText: "Oath", width: 50,}, { field: "Term", headerText: "Term", width: 50,}, { field: "OrganizationTypeName", headerText: "Organization Type", width: 50,}, { field: "RegistrarOrganizationName", headerText: "Organization", width: 50,}, { headerText: "", template: "#editTemplate", textAlign: "center", width: 15 }, { headerText: "", template: "#deleteTemplate", textAlign: "center", width: 15 }, ], });