在Gridview中动态添加模板列并根据条件禁用 [英] Adding template columns in Gridview dynamically and disabling based on condition

查看:67
本文介绍了在Gridview中动态添加模板列并根据条件禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将gridview与数据表中的数据绑定,并需要添加Edit,Delete
根据数据表中的列编辑Itemtemplates.If Isvalidated列为false
应该添加Edit,Delete模板,如果Isvalidated为true,则Edit,Delete
模板不应该在那里.所有这些都应该在后面的代码中动态发生..
有人可以帮我提供此示例代码吗?

I need to bind gridview with data in a datatable and need to add Edit,Delete
Edit Itemtemplates based on column in the datatable.If Isvalidated column is false
Edit,Delete templates should be added and if Isvalidated is true Edit,Delete
templates should not be there.All should happen dynamically in code behind..
Can anyone please help me with sample code for this???

推荐答案

在这里,您可以使用:
具有编辑,删除和插入选项的动态模板化GridView [
Here you go:
Dynamically Templated GridView with Edit, Delete and Insert Options[^]


我也在对此进行研究,如果您早了,请回复
在rajarampatel@gmail.com
i am also making study upon it please reply if you get early
at rajarampatel@gmail.com


这篇关于在Gridview中动态添加模板列并根据条件禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆