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

[Solved] dynamically bind editor template drop down

1 Answer 43 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.
ashok varma
Top achievements
Rank 1
ashok varma asked on 20 Oct 2011, 05:04 PM
Hi All,


During Ajax Binding in telerik MVC Grid can we bind the drop down list in editor template dynamically i.e., during on edit event

if not possible what needs to be done to dynamically bind the drop down list.( this question is related to the demo link http://demos.telerik.com/aspnet-mvc/grid/clientedittemplates) where we are binding drop down through
ViewData["employees"]


now i need the drop down to be binded based on the datakey of the row i.e.,  OrderID in the demo example but not using ViewBag/ViewData

1 Answer, 1 is accepted

Sort by
0
ashok varma
Top achievements
Rank 1
answered on 27 Feb 2012, 10:49 AM
1)Handle onEdit event of Grid.
2)Get the list to be binded to drop down using Jquery Ajax call for a particular order id and
3)get a reference to drop down list using it's id and bind the return data using dataBind method of drop down

Note: the return value of the ajax call should be a json result
Tags
Grid
Asked by
ashok varma
Top achievements
Rank 1
Answers by
ashok varma
Top achievements
Rank 1
Share this question
or