如何在 Telerik 网格中插入下拉列表框
我有一个 Telerik 网格,有两列,我需要将第二列保留为网格中的下拉列表框,我正在使用 ASP.NET MVC 控件
任何人都可以告诉我如何执行此操作吗?
I have a Telerik Grid, with two columns I need to keep second column as drop-down list box with in the grid, I am using ASP.NET MVC control
Can any body tell me how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我需要为我的项目这样做。
我是这样做的:
静态方法
GetRoles
返回String
的简单IEnumerable
。您仍然可以通过使用不同的SelectList
构造函数来指定自定义对象的Value
和Text
属性来返回自定义对象。I need to do that for my project.
Here is how I did it:
The static method
GetRoles
returns a simpleIEnumerable
ofString
. You still can return a custom object by using a differentSelectList
constructor to specifyValue
andText
property of your custom object.您可以设置列的模板以嵌入任意 HTML。如果使用 Ajax 绑定 - 尝试客户端模板。以下在线示例会有所帮助:
You can set the template of the column to embed arbitrary HTML. If using Ajax binding - try the client template. The following online examples will be helpful: