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

Filtering when using binding with datatable

3 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Simon
Top achievements
Rank 1
Simon asked on 22 Nov 2011, 04:36 PM
Hi,

I'm using dynamic binding with datatable. Everythin works fine except the filtering, the operator dropdown remains empty. I guess that the grid doesn't know what kind of filter to apply because no type is given. But if I know the type of the column, how could I pass this information from the controller to the view.

Regards
Simon

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 23 Nov 2011, 09:49 AM
Hi Simon,

In order to set column types in your scenario, you should upgrade to the Q3 2011 version of the Telerik Extension for ASP.NET MVC. In this version we have added MemberType setting to GridColumnSettings feature which used in the provided sample.

new GridColumnSettings { Member = "Number", Title="Number", MemberType= typeof(int) }

Regards,
Rosen
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Simon
Top achievements
Rank 1
answered on 23 Nov 2011, 10:33 AM
Hi Rosen,

thanks for that hint, my filters are working now. One little problem remains when sorting: when i sort by column A and then by column B, the sort command for the first column A is beeing removed. The link in the header in Column B is not updated, it should be:

/?Grid-size=25&Grid-orderBy=ColumnA-asc~ColumnB-asc

But it is
/?Grid-size=25&Grid-orderBy=ColumnB-asc

Thanks for help!

Regards
Simon
0
Simon
Top achievements
Rank 1
answered on 24 Nov 2011, 10:09 AM
*bump*
Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Simon
Top achievements
Rank 1
Share this question
or