Cancel Item Check

2 posts, 0 answers
  1. Kem
    Kem avatar
    14 posts
    Member since:
    Oct 2010

    Posted 15 Dec 2011 Link to this post


    I am setting a flag that is evaluated in ItemCheckedChanging. At times I need to stop an item from being checked. I have tried e.Cancel but it does not seem to work. In addition I looked for a property that contained previous checked state property but did not find anything.

    I would like to be able to keep an item from being checked on a per item base.

    Any suggestions?

    Thank You
  2. Stefan
    Stefan avatar
    2911 posts

    Posted 20 Dec 2011 Link to this post

    Hi Kem,

    Thank you for writing.

    I have tested the described scenario and on my end I can successfully prevent an item from being checked by setting the Cancel property of the arguments in the ItemCheckedChanging event to true. Additionally, from the event arguments you can access the Item and from there its CheckedState, where you can see its state before it gets changed. Alternatively in the ItemCheckedChanged you can get the changed value from the same property.

    Please have a look at my project and see how it works. Let me know if I can be of further assistance.
    the Telerik team

    of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top