复选框仅在datagrid中进行单选吗? [英] Check box only single selection in datagrid?

查看:115
本文介绍了复选框仅在datagrid中进行单选吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

欢迎大家,使用C#的网页在datagrid上.我成功绑定了sqlserver数据库中的数据.我成功绑定了sqlserver中的一些数据.现在,我在itemtemplate标签中添加了一个复选框.我只需要在datagrid的一个复选框中打一个勾,我就不需要多重选择,我需要防止在datagrid中进行多个选择.如果客户端选择了另一个复选框,则应该显示这样的错误消息您只能从datagrid中选择一项. .请帮帮我吗?



问候,

Manu.

Hai,

Welcome all, The web page using C#, have on datagrid. I bind data from sqlserver database successfully.I bound some datas from sqlserver successfully. Now I added one check box in itemtemplate tab. I need only one tick in one checkbox in datagrid, I dont want multiple selection, I need to prevent multiple selection in datagrid, If the client select any second checkbox, should show the error message like this " You can select only one item from datagrid" . Please help me?



Regards,

Manu.

推荐答案

为什么不使用单选按钮代替复选框?它将自动解决您的问题.
Why don''t you use radio button in place of checkbox? it will resolve your problem automatically.


这篇关于复选框仅在datagrid中进行单选吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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