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

Add Loading Panel On Button click Having Client And serverside event attach

3 Answers 219 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 25 Aug 2008, 12:12 PM
Hi All,

I am using Vs 2008 sp1 and RadControl Q1 2008 asp.net ajax .

On my page i am using
RadAjaxManager and RadAjaxLoadingpanel, RadScriptManager,


I have added panel on page
Inside panel control i have added two textbox and one button.

One button  i added client side validation. and Serverside Button_click event is there to execute the code.


Issue
1>I added loading panel on button click.
  But when i did this it is not calling its serverside event when client validation return true.

I want to show loading panel on button click having clientside validation and serverside event .


3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 26 Aug 2008, 01:55 PM
Hi Hrushikesh,

Could you, please try simply placing your RadAjaxLoadingPanel on the page and reference it in the RadAjaxManager settings. This way, if your controls are properly ajaxified, every callback to the server will show the loading panel:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Button1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Button1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 


Greetings,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 26 Aug 2008, 02:15 PM
Hi Veli,

I have added the code you specified .
But  when click on button it first check the Clientside function which return true/false.
When function return true value it not going to serverside button click event.

If i remove the button ajax setting , then it work correctly.

Thanking you
0
Veli
Telerik team
answered on 27 Aug 2008, 10:42 AM
Hello Hrushikesh Mokashi,

This is probably due to improper ajax settings. The sample RadAjaxManager previously posted assumed that the button ajaxifies (i.e. applies some changes) only to itself. If you have your button validate a textbox too, you will additionally add the textbox to the button's updated controls collection:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    <AjaxSettings>  
        <telerik:AjaxSetting AjaxControlID="Button1">  
            <UpdatedControls>  
                <telerik:AjaxUpdatedControl ControlID="Button1" LoadingPanelID="RadAjaxLoadingPanel1" />  
            </UpdatedControls>  
            <UpdatedControls>  
                <telerik:AjaxUpdatedControl ControlID="TextBox1" LoadingPanelID="RadAjaxLoadingPanel1" />  
            </UpdatedControls>  
        </telerik:AjaxSetting>  
    </AjaxSettings>  
</telerik:RadAjaxManager>  

Generally speaking, if a button operates on various controls, i.e. performs input validation on textboxes, updates grids and other controls, all these controls should go inside the updated controls collection of the RadAjaxManager, so that it configures the specified button to successfully update them.

Greetings,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Veli
Telerik team
Hrushikesh Mokashi
Top achievements
Rank 1
Share this question
or