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

How to check a filter option combobox in Filter dropdown in GridDataControl from code behind

 Hello

I use GridDataControl (ShowFilters = "True" and AllowFilter = "True" for all VisibleColumns).

I'd like to check an option in Filter dropdown for one of the columns in code behind. Is there a way to do this? The reason is that I want to have my GridDataControl initially filtered.

I tried this line of code:

this.myGrid.VisibleColumns[0].Filters.Add(new FilterPredicate() { FilterType = FilterType.Equals, FilterValue = "ValueA" });

It filters the grid, but unfortunately it also clears all other options from the filter dropdown and a user cannot use it.

Is there a way to filter the data properly from code behind?

Best regards,

5 Replies

JL Jolanta Lukawska February 4, 2013 02:42 PM UTC

I mean "checkbox in Filter dropdown", not "combobox in Filter dropdown". Sorry for mistake in the title ;)


JL Jolanta Lukawska February 7, 2013 12:52 PM UTC

Any idea?

Is it impossible to set the filters from code behind? Or I explained the problem unclearly?

Best regards,


DA Divya A Syncfusion Team February 8, 2013 11:56 AM UTC

Hi Jolanta,


Apologize for the delay caused.


We have analyzed the reported issue, Filter dropdown gets cleared when FilterPredicate is set from Code Behind. This issue will be fixed internally. 


However, we do not provide confidential information and patches in the general forum.


You can also create an incident in our Direct trac account with the below link.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents


That would be helpful for us to fix the issues and provide you the patch through incident.


Please let us know if you need any further assistance.


Regards,

Divya.


JL Jolanta Lukawska February 11, 2013 08:09 AM UTC

Thank you very much. I've created the incident.

Best regards,


DA Divya A Syncfusion Team February 12, 2013 09:48 AM UTC

Hi Jolanta,

 

Thanks for your update.

 

We will track the reported issue and assist you further through the created incident.

 

Regards,

Divya.


Loader.
Live Chat Icon For mobile
Up arrow icon