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

[Solved] Disable ajax for add new button

1 Answer 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 27 Aug 2009, 01:27 PM
Hi,
I have a radgrid and an ajax manager on my page.
The add new button in the grid uses the onitemcommand event and redirects the user to another page.
But when clicking on the button the grid first makes an ajax request and the loading panel is showing up, then redirects the user.
Is it possible to disable the ajax function for the add new button so the user is redirected instantly?

Regards,
Mattias

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 27 Aug 2009, 09:42 PM
Hello Mattias,

Try the following code-snippet:
<script type="text/javascript"
    function requestStart(sender, args) 
    { 
        if (args.get_eventTarget().indexOf("InitInsertButton") != -1) 
            args.set_enableAjax(false); 
    } 
</script> 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="requestStart"
.... 

I hope this helps.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Mattias
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or