How to change radtab style on failed validation

4 posts, 0 answers
  1. Mac P
    Mac P avatar
    84 posts
    Member since:
    Mar 2010

    Posted 08 Nov 2010 Link to this post

    Hello

    I have radtabstrip that loads usercontrols in dynamic radpageviews. Each user control has different validation groups. On  validation failure i need to indicate user to go ahead and fix validation errors on other tab in wizard.
    For e.g. if user goes from tab A to tab C and save it i need to display validation error on tab B. For that i need to either add Red Exclamation Mark or change the font of tab to red or tab the entire tab color to red.

    Any idea how do i do that? I am using custom skins.

    Regards
    Mac
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 12 Nov 2010 Link to this post

    Hello Mac P,

    I suggest you set CssClass property of the tab that fails the validation. Please check this online example which shows how to do this.

    Regards,
    Yana
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ben
    Ben avatar
    3 posts
    Member since:
    Jul 2015

    Posted 14 Mar Link to this post

    The posted link for the online example no longer works. I'm assuming it is now the demo page here: http://demos.telerik.com/aspnet-ajax/tabstrip/examples/appearance/uniquetabappearance/defaultcs.aspx. However I'm not seeing any way to set the CssClass of a tab that has failed validation. Is this functionality that has been removed? I can't find a way to change a tab's appearance when validation has failed.

    Also, that demo appears to be broken. I've looked at it in IE, Firefox and Chrome; the CSS seems to be really messed up in every browser and the demo doesn't show off the various states the tabs can be in.

  5. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    286 posts

    Posted 17 Mar Link to this post

    Hi Ben,

    Yes the demo has been moved to the page that you have found. It does not show how to customize RadTabs on validation failed, but it shows how one can use the CssClass property of the RadTab to customize its appearance. Currently the demo has some broken styles due to recent changes in our demos implementation.

    In order to change the CssClass of a RadTab, you could use both the client-side and server-side API, depending on where your validation has been implemented.

    Regards,
    Veselin Tsvetanov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top