RadDropDownButton Validation style

6 posts, 0 answers
  1. Predrag
    Predrag avatar
    13 posts
    Member since:
    Oct 2011

    Posted 12 Dec 2011 Link to this post

    I’m using RadDropDownButton inside DataForm, it contains RadTreeView from which user can select item. This property is required in my model, so when validation is performed in validation summary error message appears, but RadDropDownButton style is not changed (red border and tooltip). Is it possible to set this style (like for RadComboBox).

     

    Best regards,

    Predrag

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 15 Dec 2011 Link to this post

    Hi Predrag,

    The RadDropDownButton doesn't implement validation states out-of-the-box. But you can edit its ControlTemplate to add validation states and then implement your own logic to go to the appropriate visual state. You can examine the current structure of the RadDropDownButton.ControlTemplate here. And I also attached a sample project to get you started. Please let us know if we can further assist you.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Predrag
    Predrag avatar
    13 posts
    Member since:
    Oct 2011

    Posted 26 Dec 2011 Link to this post

    Hi Tina,

    Sorry for late response.

    I tried changed style like you explained (even copied your style), but with no success (control never apply those validation styles). I did similar thing for RadComboBox and it works, maybe I am missing something here, but I didn’t have more time to go dipper into problem.  

  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 29 Dec 2011 Link to this post

    Hi,
    I think that the best way to achieve the validation functionality is to create your own DropDownButton by inheriting ours and then add an IsValid property on which change you'll set the correct VisualState.
    I've created a sample project with a DataForm, TreeViews and DropDownButtons so could you please examine it and see if this is what you're looking for? In the TreeView you'll see Items and Invalid Items and if you select an Invalid Item the dropdownbutton should become red and if you focus it it's error tooltip should appear.
    If you have more questions please feel free to ask.

    Greetings,
    Zarko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Brian Chung
    Brian Chung avatar
    11 posts
    Member since:
    Mar 2010

    Posted 05 Mar 2015 Link to this post

    Hi Tina and Zarko,

    Is it possible that you can attach the RadDropDown button controltemplate xaml in file to me? I can't open it up RadDropDown button with my Blend 4 as you show on the 

    http://www.telerik.com/help/silverlight/radbuttons-styles-and-templates-template-structures.html

    Thank you!
  7. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 09 Mar 2015 Link to this post

    Hi Brian,

    You can find the default ControlTemplates of our controls in your installation directory. For more information on that matter please refer to our Editing Control Templates article.

    Do not hesitate to contact us if you have any other questions.

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner