This is a migrated thread and some comments may be shown as answers.

How can i use 100% client side ajax request ?

1 Answer 116 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
حمید
Top achievements
Rank 1
حمید asked on 23 May 2016, 01:31 PM

Hi dear Telerik

I dont want to use RadAjaxManager or RadAjaxPanel in my wbsite ,  beacause managment code is very hard !

how can use 100% client side ajax call when using AJAX UI ? 

For example i wana to use Jquery validatin instead  validation control (asp.net)  !

Is any Sample online or sample website that do it ?

please help me

thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 26 May 2016, 10:47 AM
Hello,

Actually, you can configure your RadAjaxManager settings depending on your custom scenario without overloading your app logic:
http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/radajaxmanager/overview

As for the jQuery validation requirement, please note that it is not specifically related to Telerik. The same logic with regular ASP controls can be applied. Just make sure that you are passing the correct input element names to the rules and messages object of the validate() method similar to this demo:
https://jqueryvalidation.org/files/demo/

For example, if you are using a Kendo grid with a dropdown in every item and you need to ensure that there is a selected option for every record, you can use the following approach to achieve this requirement:
Copy Code
function onDataBound(e) {
    var currentPage = e.sender.dataSource.page();
    var valRules = {};
    var valMessages = {};
    $(".templateCell").each(function (i, el) {
        eval($(this).children("script").last().html());
        var inputName = $(el).find("input.k-input").attr("name");
 
        valRules[inputName] = "required";
        valMessages[inputName] = "*Cannot be blank!";
    });
 
    $("#myFormId").validate({
        rules: valRules,
        messages: valMessages
    });
}

Regards,
Eyup
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Ajax
Asked by
حمید
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or