包含复选框列的Datagridview [英] Datagridview that includes checkbox columns
本文介绍了包含复选框列的Datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我在ASP.NET项目中使用datagridview,它有5个列,其中一个列的行号从1到10,其他列的复选框.如果用户从任何列中选择一个复选框,然后更改其想法并选择新的而不取消之前的选择之前保存按钮;首先选择的内容必须为空,否则消息将警告用户,提示已经选择了一个".
我该怎么办?
预先感谢
Hello,
I''m using a datagridview in my ASP.NET project.It has 5 colums which one of them has line number from 1 to 10 and others have checkboxes.If A user selects a checkbox from any column and later changes his idea and select new one without unchecking previous selection before pressing save button ; first selection must be empty or a message warns user which says " there is already selected one ".
How will I do this ?
Thanks in advance
推荐答案
您可以使用网格单元验证事件来检查已选中复选框".
You can use grid cell validating event to check that ''already a checkbox is selected''.
如果您只希望用户选择单行,则使用单选按钮更好.
Using radio button is better if you just want user to select single row.
本文将为您提供帮助
高级编码-文章
谢谢
Hiren Soanki
this article will definately help you
HighonCoding - Article
THanks
Hiren Soanki
这篇关于包含复选框列的Datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文