We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Inline Edit, filter column

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


3 Replies 1 reply marked as answer

JC Joseph Christ Nithin Issack Syncfusion Team January 28, 2023 05:06 AM UTC

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()

 



Marked as answer

MS Muqofa Syinagha January 30, 2023 02:48 AM UTC

Thankyou it is working



SG Suganya Gopinath Syncfusion Team January 31, 2023 06:19 AM UTC

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. 


Loader.
Live Chat Icon For mobile
Up arrow icon