BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<EjsGrid @ref="GridInstance" AllowPaging="true" DataSource="@Orders" Toolbar="@(new List<string>() { "Cancel", "Update" })">
<GridSelectionSettings Mode="Syncfusion.EJ2.Blazor.Grids.SelectionMode.Both" ></GridSelectionSettings> @*Set the SelectionMode as Both*@
<GridEditSettings AllowEditing="true" Mode="EditMode.Batch"></GridEditSettings>
<GridEvents CellSelected="CellSelectHandler" TValue="OrdersDetails"></GridEvents> @*Bind CellSelected event*@
...
</EjsGrid>
@code{
public static EjsGrid<OrdersDetails> GridInstance { get; set; }
...
public async void CellSelectHandler(CellSelectEventArgs<OrdersDetails> args)
{
var EditCellIndex = JsonConvert.DeserializeObject<Dictionary<string, object>>(args.CellIndex.ToString());
var CurrentEditCellIndex = 0;
var CurrentEditRowIndex = 0;
foreach (var key in EditCellIndex) //Fetch the currently clicked cell details
{
if (key.Key == "rowIndex")
{
CurrentEditRowIndex = Convert.ToInt32(key.Value); //Fetch the row index
}
if (key.Key == "cellIndex")
{
CurrentEditCellIndex = Convert.ToInt32(key.Value); //Fetch the column index
}
}
var fied = await GridInstance.GetColumnFieldNames(); //Get the name of fields in Grid
GridInstance.EditCell(CurrentEditRowIndex, fied[CurrentEditCellIndex]); //Call the “EditCell” method
}
...
}
|