将先前检查的值绑定到复选框列表中 [英] Binding previously checked values in a checkboxlist

查看:57
本文介绍了将先前检查的值绑定到复选框列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单,其中我必须提交复选框列表中存在的值,以后我需要编辑那些值,以便我需要将先前检查的值绑定到chekboxlist中.帮助我绑定...

i have a form, in which i have to submit values present in the checkboxlist, later i need to edit those values for that i need to bind the previously checked values in the chekboxlist.help me to bind ...

推荐答案

选中此选项..

http://stackoverflow.com/questions/6445178/set-checkbox-in-gridview-based-on-datatable-value
Check this..

http://stackoverflow.com/questions/6445178/set-checkbox-in-gridview-based-on-datatable-value


为您的解决方案,您需要从检查中找到列表项框列表,该框的值与先前的值相同,并将其selected属性设置为true或selected,然后它将选中/取消选中该复选框.

像这样的东西...
for your solutions your need to find the list item from check box list which value is same as your previous value and set its selected property to true or selected, then it will checked/unchecked that check box.

some thing like this...
chklist.items.findbytext('yourpreviousvalue').checked = true;



请参考此链接,它将根据您的情况向您展示如何选中/取消选中复选框列表项.

选中/未选中复选框列表 [ ^ ]



please refer this link it will demonstrate you how to check/unchecked check box list item based on your condition.

Check/Unchecked Check box list[^]


这篇关于将先前检查的值绑定到复选框列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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