Ok, I removed everything except the UniqueName from the column:
<radG:GridCheckBoxColumn UniqueName="cbCol"> |
</radG:GridCheckBoxColumn> |
And I've modified my aspx.cs page a little bit:
protected void rdgOrderItems_OnItemDataBind(object sender, Telerik.WebControls.GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
GridDataItem item = (GridDataItem)e.Item; |
CheckBox chkbx = (CheckBox)item["cbCol"].Controls[0]; |
string strtxt = item["ItemTypeName"].Text.ToString(); |
if (strtxt == "Sponsorship") |
{ |
chkbx.Visible = false; |
lbCancelEntireOrder.Visible = false; |
} |
} |
The lines that hides lbCancelEntireOrder works - while the line that hides chkbx does nothing.
What am I doing wrong here, any idea? Thanks.