At first at worked with EJ1 grid but now i décided to implement the EJ2 grid so:
my grid plugin is:
@Html.EJS().Grid("FlatGrid").DataSource((System.Data.DataTable)ViewBag.DataSource).Columns((List<Syncfusion.EJ2.Grids.GridColumn>)ViewBag.cols).EnableVirtualization().AllowResizing(true).Height("700").Width("auto").AllowFiltering().AllowSorting().AllowSelection().FilterSettings(filter =>
{ filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).ToolbarClick("toolbarClick").Toolbar(toolbarItems).Render()
With EJ1 i wrote the following two lignes to get the index of the selected row when i did this with my new grid i get undifined in my variable gridObject.
var gridObject = $.extend(true, {}, $("#FlatGrid").data("ejGrid"));
var rowIndex = gridObject.model.selectedRowIndex;
How can i get the index with EJ2.