Hi Muqofa,
Greetings from
Syncfusion support.
Based on your query,
you want to use both filtering and editing in the same grid. Your requirement can
be achieved by using `allowFiltering` property and `editSettings.allowEditing`
property of the EJ2 Grid.
Refer the below
code example:
@Html.EJS().Grid("ExcelFilter").DataSource((IEnumerable<object>)ViewBag.DataSource).AllowFiltering().FilterSettings(Filter
=> Filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel)).Columns(col =>
{
col.Field("OrderID").HeaderText("Order
ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("CustomerID").HeaderText("Customer
Name").Width("150").Add();
col.Field("OrderDate").HeaderText("Order
Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add();
col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("ShipCountry").HeaderText("Ship
Country").Width("120").Add();
}).AllowPaging().EditSettings(edit => {
edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal);
}).Toolbar(new List<string>() { "Add", "Edit",
"Delete", "Update", "Cancel" }).Render()
|