The parent checkbox doesn't get toggled on IsChecked = true

4 posts, 0 answers
  1. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 05 Mar 2012 Link to this post

    Hi,

    I have a RadTreeView of checkboxes. I have defined HierarchicalDataTemplate and have ContainerBinding of the IsSelected property.

    On initialization, when I add countries to the treeview by doing
    Country country = new Country() { Name = countryName, IsExpanded = true, IsSelected = true};

     

    The country gets checked but the parent node "Region" doesn't get ToggleState.Indeterminate. See attached image. Even when i programmtically set "IsSelected = true" , the country gets checked but it's parent is not.

    Though if we directly check the country on UI, the parent node gets ToggleState.Indeterminate state.

    This behavior is inconsistent. Please let me know how we can maintain a consistent behavior.
    Thanks.
  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 06 Mar 2012 Link to this post

    Hi,

    There are many variation of the checkboxes behavior depending on several factors. Could you please elaborate a bit more on your scenario: is the built-in checkbox support enabled or custom checkboxes are used in the data template; is the tri-state mode enabled; are you using data binding to CheckState property.
    I assume you are using build-in checkbox support with enabled tri-state mode.

    If there is binding to the CheckState property the binding will take precedence. This means that check state values in the view model will override those from tristate mode. Thus you should implement the logic yourself.

    If there is no binding could you please specify how are you changing the CheckState. The best approach would be to send us a small sample project simulating the issue (via the ticketing system).

    You could take advantage of the support ticketing system (http://www.telerik.com/account/support-tickets/new-support-ticket.aspx) in cases when you need a prompt response to urgent issues. This is the best way to reach our support staff - the support system assigns a response time for all of your questions,
    depending on your license and ensures that all questions will reach the respective developers, if needed.

    I'm looking forward for your post.

    Kind regards,
    Hristo
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Dipti
    Dipti avatar
    37 posts
    Member since:
    Dec 2011

    Posted 07 Mar 2012 Link to this post

    I have raised a support ticket - 520044 and have provided a sample.

    All the questions that u've asked have been answered in the sample, but still here are few details:

    1) I have used the built-in checkboxes.
    2) tri-state mode enabled
    3) I have done data binding to IsSelected property of checkboxes
    4) I have written a logic to check the checkboxes to ToggleState.On and their parent to ToggleState.Indeterminate. But the logic works correctly only when the popup containing the treeview has been opened once. It doesn't work if the popup hasn't been opened even once.

    Awaiting a quick reply to my support ticket.

    Thanks.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 08 Mar 2012 Link to this post

    Hi Dipti ,

     We replied to your other tickets.

    Regards,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top