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

Looking for a Solution to bind on the original object of type List(of T) to Rad Grid

1 Answer 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venkateswara Adabala
Top achievements
Rank 2
Venkateswara Adabala asked on 24 Oct 2011, 06:20 PM

We have a series of management forms that utilize the RadGrid RadControl for Asp.Net Ajax (2010, 3, 1317, 35) and are bound to objects of type List (of T). The issue we are facing is that sorting and filtering, utilizing the grids header sorting/filtering features on fields that are foreign keys to other objects of type List (of T), don’t sort/filter by its textual value. Rather, it filters on the ID as it is the data originally bound to the grid and the only value stored in the data bound List (of T). It can be assumed that each List (of T) object directly correlates to a table. What we are looking for is a reasonable solution given the following constraints:

  • The main object of type List (of T) cannot be altered to include other properties.

      My hope is that there is a solution to bind on the original object of type List (of T), and sort/filter in some custom fashion (within the constraints of the grid) utilizing the foreign property link between its parent object of type List (of T). I have included an image below of what I am attempting to do as attachment.


Thanks.
Venky Adabala

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 25 Oct 2011, 09:05 AM
Hello Venkateswara,

Thank you for the detailed explanation.

The only solution for your scenario I can think of (although not very elegant) is to use a hidden GridBoundColumn which is bound to the text values related and displayed in the foreign key grid column. Then on filtering or sorting operation triggered for the foreign key column, you need to cancel the default operation and execute it against the hidden GridBoundColumn that contains the actual text values. 

For reference you can review the implementation from this help article. I hope this approach is doable in your case.

Kind regards,
Sebastian
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
Venkateswara Adabala
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or