如何将复选框列表项添加到网格 [英] how to add checkboxlist items to grid

查看:97
本文介绍了如何将复选框列表项添加到网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:CheckBoxList ID="ChkNumber" runat="server" RepeatDirection="Horizontal" SelectedValue=''<%# Eval("Number") %>''>
<asp:ListItem Value="A">A
<asp:ListItem Value="B">B
<asp:ListItem Value="C">C
<asp:ListItem Value="D">D
<asp:ListItem Value="E">E
<asp:ListItem Value="F">F
<asp:ListItem Value="G">G



我已经在设计页面中添加了此功能,但是当我在复选框列表中选择两个或三个项目时,只有第一个选定的复选框项目保存在网格中.谁能帮我解决这个问题
我应该怎么做才能将所有值存储在网格中.



I have added this in my design page but when I select two or three items in checkboxlist only the first selected checkbox item is saved in grid. can any one help me in this problem
what shall i do to get the all value been stored in grid.

推荐答案

Selecting multiple checkboxes inside a GridView control[^]

Take a look at this article!


该项目实际上并没有存储到存储在数据库中的网格中.网格只是用于显示它的UI部分.

您确定要在数据库中保存所有CheckBox选中的值,并进一步努力检查CheckedBoxList中的多个<code> Checkbox以显示所有选中的框吗?

我敢肯定,您对某些事情有误解.进一步共享保存代码可以解决问题,并且几乎没有提示.

谢谢.
The Item is not actually stored into grid it''s stored into DB. Grid is just a UI part to display it.

Are you sure you are saving all checked value of CheckBox in DB and further making effort to check multiple <code>Checkbox among CheckedBoxList to display all the checked box ?

I am sure you are misunderstanding some thing regarding. Sharing a saving code further can solve a problem and provide little hint towards.

Thanks.


这篇关于如何将复选框列表项添加到网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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