string isEditable=grdDesignation.DataKeys[index].Values["IsDeletable"].ToString();
if (isEditable == "True")
{
chkEditable.Checked = true;
}
else
{
chkEditable.Checked = false;
}
I just shortned the code to below like this but showing the errors
Only assignment, call,increment and new object expressions c
(isEditable == "True") ? chkEditable.Checked=true : chkEditable.Checked = false;


Posted Sep 1, 2013, 11:47 PM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Sep 1, 2013, 11:53 PM EDT
mohammed shamsheerRank #4,152 · 361 reputationPosted Sep 2, 2013, 12:41 AM EDT
mohammed shamsheerRank #4,152 · 361 reputationPosted Sep 2, 2013, 12:43 AM EDT
Posted Sep 2, 2013, 1:30 AM EDT
chkEditable.Checked = (isEditable == "True") ? true : false;
mohammed shamsheerRank #4,152 · 361 reputationPosted Sep 2, 2013, 1:41 AM EDT