Hello, I need filters column on grid inline editing, I have been searching and tried to implement .
.AllowFiltering()
and
.FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); })
But the filter is not there.
Is there any way to include the filter on inline editing? Thanks
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()
|
Thankyou it is working
Muqofa,
We are glad that the provided solution helped to solve the issue. Please get back to us for further assistance.
We are marking this ticket as solved.
Regards,
Suganya Gopinath.