Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
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"]),

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)' >";

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' >";
Posted
Updated 21-Sep-11 1:52am
v2

1 solution

Hi, that is a native html input type="checkbox" so it will not understand enabled="true/false". Use this:

ASP.NET
<input id="myChkBxId" runat="server" type="checkbox" disabled="disabled" />


Good luck,
Morgs
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900