BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
hi
I add the records to the list by code and then bind them to the grid and then store them in the database.
I want the toolbar button to be activated immediately after binding to list.
how to set state all rows to edit mode without changing grid cell value?
how to enable save button on toolbar?
i dont use GridInstance.AddRecordAsync(data) to add records to grid
Is there a flag to enable cell editing?
Hi Ali,
Greetings from Syncfusion support
We have analyzed your query and we would like to inform that, There is not possible to set all grid cell to edit mode in batch edit. We also prepared sample for enable save button on toolbar and a flag to enable cell editing by using button click to enable edit mode. Please refer the attached sample and snippet code for your reference
<SfButton OnClick="@Enable">EnableEdit</SfButton> <SfGrid DataSource="@Orders" @ref="Grid" AllowPaging="true" Toolbar=@ToolbarItems Height="315"> <GridEditSettings AllowAdding="true" AllowEditing="@Allowedit" AllowDeleting="true" Mode="EditMode.Batch"></GridEditSettings> &&
private List<object> ToolbarItems = new List<object>() { new ItemModel() { Text = "Add Record", PrefixIcon = "e-add", Id = "Grid_add"},//Here Grid is SfGrid ID new ItemModel(){ Text = "Edit Record", PrefixIcon= "e-edit", Id="Grid_edit"}, new ItemModel(){ Text = "Delete Record", PrefixIcon= "e-delete", Id="Grid_delete"}, new ItemModel(){ Text = "Update Record", PrefixIcon= "e-update", Id="Grid_update"}, new ItemModel(){ Text = "Cancel Changes", PrefixIcon= "e-cancel", Id="Grid_cancel"},
};
public bool Allowedit = false;
public void Enable() { Allowedit = true; }
public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args) { if (args.Item.Text == "Update Record") { Grid.EndEditAsync(); } if (args.Item.Text == "Delete Record") { Grid.DeleteRecordAsync(); } if (args.Item.Text == "Cancel Changes") { Grid.CloseEditAsync(); } } |
Please let us know if you have any concerns.
Regards,
Naveen Palanivel