如何自动选中复选框 [英] how to check check boxes automatically

查看:93
本文介绍了如何自动选中复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,
我正在将datagridview与多个表绑定.如果要从特定表进行数据绑定的行,我想自动选中复选框.Datagridview已经具有复选框
有人可以帮助我.....

hi sir,
i am binding datagridview with multi tables.I want to check the check boxes automatically if the row of data binding from particular table.Datagridview already have checkboxes
some one help me please.....

推荐答案

您需要使用模板字段. TemplateField对象使您可以指定包含标记和控件的模板,以自定义GridView控件中列的布局和行为.使用ItemTemplate,可以指定GridView在列中显示数据时要使用的布局.

在这里阅读所有内容:
MSDN:在GridView控件中使用TemplateFields [ MSDN:在GridView Web服务器控件中创建自定义列 [ MSDN:TemplateField.ItemTemplate属性 [ ^ ]
You need to use template fields. A TemplateField object enables you to specify templates that contain markup and controls to customize the layout and behavior of a column in a GridView control. Using an ItemTemplate, you can specify the layout to be used when the GridView displays data in a column.

Read all about it here:
MSDN: Using TemplateFields in the GridView Control[^]
MSDN: Creating a Custom Column in a GridView Web Server Control[^]
MSDN: TemplateField.ItemTemplate Property[^]


这篇关于如何自动选中复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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