Force specific level selection

3 posts, 0 answers
  1. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 12 Apr 2013 Link to this post

    Hi Peter,

    When validating a drop down list, is there a way to make it so that only data in the last level of a branch is selected?  ie in the example below only the bold text would count as a selected value and as such allow the control to validate to true.

    1
    1.1
    1.1.1
    1.1.2
    1.2

    1.3
    1.3.1

    Regards

    Jon
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 16 Apr 2013 Link to this post

    Hello Jon,

    Here are my suggestions:

    1. Use single selection and handle the OnClientEntryAdding event and cancel the event when a particular node is selected.
    2. Use single selection and and allow every of the nodes to be selected and use custom field validator to check selected value of the control.
    3. Use the approach in the following demo and use checkboxes.

    Regards,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 16 Apr 2013 Link to this post

    Hi Peter,

    Yeah the single selection isn't really an option as sometimes I need the ability to check a large number of child nodes.

    I think I'll use a custom validator and just parse the list to ensure that a node with no children has been checked/selected.

    Best Regards

    Jon
Back to Top