This is a migrated thread and some comments may be shown as answers.

Disabled Items are selectable

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Butler
Top achievements
Rank 1
Paul Butler asked on 04 Mar 2010, 12:32 PM
Hi...

I have a RadGrid where i disable (e.Item.Enabled = false;) on ItemDataBound depending on some condition.

The grid has a client select column with a checkbox which, on databound, is disabled based on the same condition described above. 
CheckBox chkbx = (CheckBox)item["SelectCol"].Controls[0];
chkbx.Enabled = false;

All of this functionality works fine and is rendered correctly in the browser.  

However. my grid allows the user to click anywhere in the row to select the item client side.

The problem is that even the rows that are set as disabled on the ItemDataBound event are selectable and the checkboxes also get marked with a tick.

Surely setting the e.Item.Enabled = false; should not even allow selection on the client?

Any help with work arounds will be very useful.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 08 Mar 2010, 04:03 PM
Hello Paul,

Basically, the behavior and functionality which you described are dependent on clicking the row, rather than the attributes of the item.
Attached to this message, is a small sample, which demonstrates a possible workaround.
I hope it helps.

All the best,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Paul Butler
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or