...
<EjsGrid id="Grid" @ref="@defaultGrid" DataSource="@gridData" AllowPaging="true" AllowSelection="true" SelectedRowIndex="2">
<GridSelectionsettings Mode="@SelectionMode.Both"></GridSelectionsettings>
<GridPageSettings PageSize="5"></GridPageSettings>
...
</EjsGrid>
@functions{
EjsGrid defaultGrid;
public List<OrdersDetails> gridData { get; set; }
protected override void OnInit()
{
gridData = OrdersDetails.GetAllRecords();
}
} |
Thank you Rahul for your prompt reply.
It worked like a charm.
Best regards
Panikos Frangoudes
<EjsGrid id="Grid" @ref="@DefaultGrid" RowSelected="OnSelected" DataSource="@gridData" AllowPaging="true" AllowSelection="true" SelectedRowIndex="2"> |
<EjsGrid id="Grid" @ref="@DefaultGrid" DataSource="@gridData" AllowPaging="true" AllowSelection="true" SelectedRowIndex="2">
<GridEvents RowSelected="OnSelected" TValue="OrdersDetails"></GridEvents>
………………………………
</EjsGrid>
@code{
EjsGrid<OrdersDetails> DefaultGrid;
public List<OrdersDetails> gridData { get; set; }
public void OnSelected(RowSelectEventArgs<OrdersDetails> args)
{
//
}
} |