开发者

Telerik-Mvc Grid access ViewData from ClientTemplate section

开发者 https://www.devze.com 2023-03-20 12:44 出处:网络
I am using Telerik-MVC Grid in Client BatchEdit mode. Using EditorTemplate I can get a dropdownlist appearing once in the relevant cell is selected for editing, the id changes appropriately for what

I am using Telerik-MVC Grid in Client BatchEdit mode.

Using EditorTemplate I can get a dropdownlist appearing once in the relevant cell is selected for editing, the id changes appropriately for what is selected from the dropdown, default item is selected etc, problem is when not in edit mode the cell will only display the id.

The reference data for this id is a list of objects that has the matching id and display name included from a reference table and is being dumped into ViewData[开发者_如何转开发"PositionsTypes"] as a List

How do I use the id from the grid cell and obtain the matching name from the ViewData["PositionsTypes"] list

Hope this make sense, its driving me nuts.


You can check the "Batch editing with ComboBox editor template" code library project. It may give you some ideas.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号