Disabled Items are selectable

2 posts, 0 answers
  1. Paul Butler
    Paul Butler avatar
    7 posts
    Member since:
    Jan 2010

    Posted 04 Mar 2010 Link to this post

    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.
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 08 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top