绑定到flexigrid时禁用复选框 [英] disabling checkbox while binding to flexigrid
问题描述
我正在一个允许用户订阅电子邮件和短信的网站上
在页面加载时,我将网格绑定到页面,其中具有以下列
sms_verified_status | smscheckbox | emailverifiedStatus | emailCheckbox
如果
I m working on a website which allows users to subscribe for emails and sms
on page load i bind a grid to page whch has following columns
sms_verified_status|smscheckbox|emailverifiedStatus|emailCheckbox
if
email_verified_status=yes
,则仅我要启用电子邮件复选框,而sms
相同
在Web服务中,所有这些数据都被放入数据表中,然后将一行数据绑定到flexigris
flexxigrid绑定代码为
then only i want to enable the checkbox for email and same for sms
in webservice, this all data is taken in datatable and then row by row data is bound to flexigris
the flexxigrid binding code is
new XElement("cell", row["AC_EMAIL_checkbox"]),
new XElement("cell", row["UD_EMAIL_VERIF_STATUS"]),
根据电子邮件的验证状态,应启用或禁用chechbox
绑定行时可以这样做吗?
怎么做?
在下面的行中,我正在创建要插入flexigrid的复选框
depending on email verified status the chechbox should be enabled or disabled
can i do so while binding the row?
how to do so?
In following line i m creating checkbox to be inserted in flexigrid
dr["AC_EMAIL_FLG"] = "<input id=''Checkboxemail_"+dr["USR_ID"].ToString()+ "'' type=''checkbox'' checked onclick=''checkEmail(this)'' >";
我尝试添加enabled =''true''和enabled =''false'',但没有成功
i tried adding enabled=''true'' and enabled=''false'' but didnt work
dr["AC_EMAIL_FLG"] = "<input id=''Checkboxemail_"+dr["USR_ID"].ToString()+ "'' type=''checkbox'' checked onclick=''checkEmail(this)'' Enabled=''false'' >";
推荐答案
您好,它是本机html输入type ="checkbox",因此无法理解enabled ="true/false".使用这个:
Hi, that is a native html input type="checkbox" so it will not understand enabled="true/false". Use this:
<input id="myChkBxId" runat="server" type="checkbox" disabled="disabled" />
祝你好运,
莫尔斯
Good luck,
Morgs
这篇关于绑定到flexigrid时禁用复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!