This is a migrated thread and some comments may be shown as answers.

[Solved] Gridview Filter checkboxes binding

2 Answers 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
theresa
Top achievements
Rank 1
theresa asked on 03 Mar 2011, 01:50 PM
Hi, I am just wondering if I can bind the default filter pop up's checkbox to one my of gridview itemsource's property?
ex. I have a gridview whose itemsource is MarketList. Market has property of MarketName and IsDefaultSearchValue. I'd like to have a column of MarketName which is filterable by marketNames of course. What I would like to achieve is If I click the MarketName column filter icon, the filter pop will appear with suggested names to be filtered with corresponding checkboxes. But I would like to bind the checkboxes to the IsDefaultSearchValue Property. So automatically, when I click the filter icon, it will show the names but one checkbox is already checked if it is the defaultsearch value for filter.

Now I know that filter pop ups can be customized and I already did that but this time since the "appearance" of the default filter pop up is already okay with me, I just want to reuse it but I just can't get how to bind it or programattically make the Ischecked=true of the checkbox since it is a built in control.(I don't have any idea where to alter the xaml and bind it if ever). I'd like to know if this is possible, if yes, please teach me how. A demo perhaps? thanks.

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 03 Mar 2011, 02:08 PM
Hi theresa,

You can achieve this by using the Pre-filtering feature of RadGridView. You can programmatically select any number of distinct values to filter on in this way.

But have in mind that if you take this approach the grid will "start" already filtered by the criteria that you have defined.

I hope this helps.

Regards,
Ross
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
theresa
Top achievements
Rank 1
answered on 03 Mar 2011, 02:27 PM
hi, thanks for the speedy reply.
Will do the example provided tomorrow and let you know if it works exactly how I want it. Thanks!
Tags
GridView
Asked by
theresa
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
theresa
Top achievements
Rank 1
Share this question
or