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

Creating combobox dropdown (combobox excel style) filters for a radgrid

2 Answers 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve Holdorf
Top achievements
Rank 1
Steve Holdorf asked on 18 Jul 2012, 08:24 AM
I need to create custom dropdown (combobox excel style)filters for a very complex hierarchy RadGrid. Now the filter column needs to be a dropdown (combobox) listing the types of values from the bound cells to filter by. The Telerik demo is great; however, they build the radgrid dynamically. I have the grid hierarchy (Master/Details) defined in the markup and would have a very difficult time building the grid dynamically. Has anyone done this with a Telerik RadGrid and if so can you provide me sample code?

I am updating my post to be more specific. My master/Details hierarchy has the filter bar across the top of the parent grid columns. Now, what I need is to either be able to replace the default filter dropdown with a listing from it's parent column data. I usually bind the data to the rad controls either through a generic list of strings or a simple datatable. I did try a variation of the Grid excel binding demo but it did not work. Somehow I need a dropdown, or something, to list the values of that column's cell then hook an event to allow me to apply a filter on the grid rows data based on the filter. I hope this explains what I am trying to do better.
 
One final update. I know how to do the filtering on the server side, with a postback, and how to bind it to either a generic list or datatable. All I really need is to make it look like an excel style filter with each filter above each column. The customer wants it to look like a spreadsheet and I can't have a serprate filter panel above the grid or anything like that. They are very picky so this is a tough one.

Thanks,


Steve Holdorf

2 Answers, 1 is accepted

Sort by
0
Steve Holdorf
Top achievements
Rank 1
answered on 18 Jul 2012, 12:49 PM
I saw this article http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx on filtertemplate column radcombobox. Do you feel that this is the correct solution? My internet machine is seperate from my development machine and if this is not the correct way to go then I would hate to type in all of that code and not have the right solution. Please advise.
NOTE: I just found out that the customer wants multiple filter grouping so the dropdown needs to contain checkbox items. I can probably start with the sample above just set checkboxes="true". The main thing is the dynamic binding.
Thanks,


Steve Holdorf
0
Marin
Telerik team
answered on 23 Jul 2012, 07:02 AM
Hello,

 Yes, the filter template demo is the proper way to start with the implementation of this excel-like filtering. You can also customize there the RadComboBox in the desired way. The filtering is performed by firing a client-side filter command with the proper parameters.

Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Steve Holdorf
Top achievements
Rank 1
Answers by
Steve Holdorf
Top achievements
Rank 1
Marin
Telerik team
Share this question
or