Refreshing Checkbox state

4 posts, 0 answers
  1. David Brubacher
    David Brubacher avatar
    29 posts
    Member since:
    Mar 2010

    Posted 19 Mar 2010 Link to this post

    When I populate a list with some child elements checked and others not, how do I refresh the state of the checkbox on the parent without expanding the checkbox?

    In the attached images, Populated is what I see immediately after the list is populated and Expanded is what I see when I expand the first item. The checkbox beside the parent now shows the correct tri-state symbology.
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 23 Mar 2010 Link to this post

    Hi David,

    The reason why the CheckState of a parent item is not updated until it's expanded is that the containers for its children are not yet generated. The way to work around this is to get a reference to the container of the parent item that you add children to and manually set its CheckState to the appropriate value, depeneding on the states of the children. Let me know if you need help with that.

    Kind regards,
    Tihomir Petkov
    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. DevCraft banner
  4. Dave Brubacher
    Dave Brubacher avatar
    2 posts
    Member since:
    Nov 2004

    Posted 24 Mar 2010 Link to this post

    I don't have that many items and have other reasons to force all child containers to be generated. That should do it too right?
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 25 Mar 2010 Link to this post

    Hello Dave,

    Yes, if the containers for the child items are generated/rendered, then the CheckState of the parent item should be updated correctly.

    Regards,
    Tihomir Petkov
    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.
Back to Top