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.
Unfortunately, activation email could not send to your email. Please try again.

Menu filter and excel filter in one grid

Thread ID:

Created:

Updated:

Platform:

Replies:

124991 Jul 13,2016 03:53 AM Feb 19,2018 05:34 AM JavaScript 5
loading
Tags: ejGrid
Pawel Klimczyk
Asked On July 13, 2016 03:53 AM

Is it possible to have both "menu filter" and "excel filter" in one grid?
For example "menu filter" for Column A and "excel filter" for Column B.


Mani Sankar Durai [Syncfusion]
Replied On July 14, 2016 06:25 AM

Hi Pawel, 

Thanks for contacting Syncfusion support, 

Yes, we can enable both excel and menu filter for different columns. We can achieve it by using the FilterType property of columns as either menu or excel for the particular column.  

For your convenience please refer the below code example, 

 
$("#Grid").ejGrid({ 
                    … 
                    allowFiltering: true, 
                    filterSettings: { filterType: "excel" }, 
                    columns: [ 
                            { field: "OrderID", isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 75 }, 
                            { field: "CustomerID", filterType: "menu", headerText: "Customer ID", width: 120 }, 
                    ]  
                }); 
                }); 

We have also prepared a sample that can be downloaded from the below link, 
 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


Vishal Manghnani
Replied On August 5, 2016 12:20 PM

Hi Could you post a sample for doing this without javascript?
I tried it by setting the grid property .AllowFiltering() and then set FilterType property of a column as col.Field(p => p.ClientName).HeaderText("Client Name").FilterType(FilterOption.Excel).Add(); 
The column client name still showed as a Text box rather than an excel type drop down

Thanks

Mani Sankar Durai [Syncfusion]
Replied On August 8, 2016 06:48 AM

Hi Pawel, 
 
We have analyzed your query and found the cause of the issue. You have initialized the filterType as excel for one column and not initialized the filterSettings to have the filterType as menu for other columns. This is the cause of the issue. If you enable the filterType as filterBar which is common for all columns and set the filterType as excel or menu for particular columns it will show as filterBar (Textbox). So we suggest you to mention the filterSettings to render the filterType as either menu or excel for other columns. 
Please refer the below code example, 
[Index.cshtml] 
@(Html.EJ().Grid<object>("Grid") 
          
        .AllowFiltering() 
        .FilterSettings(filter => { filter.FilterType(FilterType.Menu); }) 
        .Columns(col => 
        { 
            
col.Field("Freight").HeaderText("Client Name").FilterType(FilterOption.Excel).Add();  
        }) 
) 

We have also prepared a sample that can be downloaded from the below link, 

Please let us know if you need further assistance 
Regards, 
Manisankar Durai 


Clovis
Replied On February 17, 2018 12:19 PM

Hi

Is it possible to have FilterBar as grid filtering option and Excel or Menu for specific columns ?

Thanks

Balasubramanian Masilamani [Syncfusion]
Replied On February 19, 2018 05:34 AM

Hi Clovis, 

Thanks for contacting Syncfusion support. 

We have checked your query and found that you want to use filterBar as grid filterType and with Menu or Excel filter as filterType for specific columns. Since it is not feasible by setting the menu or excel as column filterType when the grid contains the filterType as filterBar . If you need to use either Menu filter or excel filter for specific columns, we suggest you to use Menu filter or Excel filter as grid filterType. 
 

Please let us know if you need further assistance. 
 
 
Regards, 
Balasubramanian Masilamani 





CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;