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

Foreign Key Column Binding

1 Answer 76 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.
Dave Hayward
Top achievements
Rank 1
Dave Hayward asked on 07 Jun 2012, 01:55 PM
I have an application for a foreign key column that has a slightly different list for each row in the grid. The list is actually filtered from a common list.

Is there a way to bind the SelectList data to the grid row item data rather than ViewData ?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 12 Jun 2012, 07:19 AM
Hello Dave,

There isn't a configuration option with which to bind the DropDownList data through the item data. If the SelectList is part of your model, you can use the dataBind client-side method in the Grid's OnEdit event to bind it to the DropDownList e.g.
function onEdit(e) {
    var drop = $(".t-dropdown input").data("tDropDownList");
    drop.dataBind(e.dataItem.SelectListData);
}


Regards,
Daniel
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.
Tags
Grid
Asked by
Dave Hayward
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or