How to activate tab on which validation error is occuring
Microsoft Net Framework

How to activate tab on which validation error is occuring

on page submit call below code in  javascript

   var validator = $("form#BrowseAccountEdit").kendoValidator({
        validate: function () {
            var tabId = $(".k-invalid:first").attr("data-tabid");
            var tabLiId = $(".k-invalid:first").attr("data-tabliid");
            if (tabId != null && tabLiId != null) {
                activateValidTab(tabId, tabLiId);
            }
            //alert(tabId);
            error = true;
        }
    }).data("kendoValidator");

 

function that will activate tab

function activateValidTab(tabId, tabLiId) {
    deActivateTab();
    debugger;
    $("#" + tabId).addClass('active in');
    $("#" + tabLiId).addClass('active');
}


function that will de-activate tab


function deActivateTab() {


    $("#tabsettings").removeClass("active");
    $("#tabschedule").removeClass("active");
   

 

    $("#box_RSSettings").removeClass('active in');
    $("#box_RSCelender").removeClass('active in');


}

Share This with your friend by choosing any social account


Upcoming Articles
You may also read following recent Post
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM