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

Table with foreign key

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rafael
Top achievements
Rank 1
Rafael asked on 14 Feb 2012, 07:42 PM
TbCity: idCity,name,idState
TbState:idState,name

In RadGrid I want to view and search the following fields through the TbCity : TbCity.name and TbState.name.
How do I proceed?Thanks.. 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 20 Feb 2012, 07:35 AM
Hello,

To achieve your goal you could try using a hidden GridBoundColumn which is bound to the text values related and displayed in the foreign key grid column. Then on filtering 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.

Regards,
Pavlina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Grid
Asked by
Rafael
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or