Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Buttons > RadDropDownButton Validation style

Not answered RadDropDownButton Validation style

Feed from this thread
  • Predrag avatar

    Posted on Dec 12, 2011 (permalink)

    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

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Dec 15, 2011 (permalink)

    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 >>

    Reply

  • Predrag avatar

    Posted on Dec 26, 2011 (permalink)

    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.  

    Reply

  • Zarko Zarko admin's avatar

    Posted on Dec 29, 2011 (permalink)

    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 >>

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Buttons > RadDropDownButton Validation style