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

How to Disable/Hide Custom Filters ASP.NET MVC Grid

How do i Disable or Hide the custom filters option in the filters drop down via Razor syntax?  I realize I could style it out or utilize the 'Disable_MenuItem' class to disable it, but it would be great to have a razor method to disable custom filters.

Example
--  IGridBuilder<T> EnableFiltering(bool EnableCustomFiltering);

OR

--  .Filtering(filter =>
        {
            filter.AllowCustomFiltering(false);
        })

I believe this can be achieved by overloading some of the functions with the WinForms control.


Thanks,
Adam

Attachment: CustomFilter_e142b2fd.zip

1 Reply

SK Shanmugaraja K Syncfusion Team March 26, 2014 12:25 PM UTC

Hi Adam,

 

Thanks for using Syncfusion products.

 

We would like to let you know that  your requirement has been achieved  as a Workaround by overriding css class. Please refer the below code  snippet to achieve your requirement.

 

[CSS]

 

li.Disable_MenuItem + li > ul

        {

            display:none !important;

        }

.sf-menu > li > a > span.arrows

        {

            display:none;

        }

 

Also refer the below attached sample for further reference.

 

Please let us know if you need further assistance.

 

Regards,

Shanmugaraja K


Attachment: MvcApplication23_81a165fa.zip

Loader.
Live Chat Icon For mobile
Up arrow icon