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

Loading panel on tab click

3 Answers 97 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 23 Jul 2008, 08:02 AM

Hi All,

I am using RadControl asp.net ajax Q1 2008 and asp.net 3.5

In my application ,i am using radajaxmanager,radajaxloadingpanel,radtabstrip.

I used 4 tab and on each tab grid is there.
on each tab grid  loads.
 To have loading panel on grid load i used the following code

On aspx file
I added code as
<script>
 window.onload = function()
            {
               if ('<%= Session("TabClick") %>'=="true")
               {
                setTimeout( function(){
                $find("<%= rdAjaxManagerHistoryGrid.ClientID %>").ajaxRequest("InitialPageLoad");
                }, 200);
                }
                
                
            }
</script>
 Here  Session("TabClick")  variable set on tab click and on initial page load.

The code behind file code are

Protected Sub rdAjaxManagerHistoryGrid_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles rdAjaxManagerHistoryGrid.AjaxRequest

                if e.Argument = "InitialPageLoad" Then

                 If rtabCall.SelectedIndex = 0 Then
                    rdAjaxManagerHistoryGrid.AjaxSettings.AddAjaxSetting(rdAjaxManagerHistoryGrid, rGridAccounts, LoadingPnlCustom)

                   rGridAccounts.DataSource = Me.AccountsData
                    rGridAccounts.Rebind()
                 end if
             end if
end sub

    rdAjaxManagerHistoryGrid.AjaxSettings.AddAjaxSetting(rdAjaxManagerHistoryGrid, rGridAccounts, LoadingPnlCustom) line is also added on pageload and tab click event.


Query

It shows the loading panel on alternate times.
When i am on tab 1 it shows the loading panel and when go to second tab it also shows the loading panel.
But when i came back to first tab it is not showing the loading panel. And then again go to next tab and come to first tab it showing the loading panel


I want to show loading panel on each tab click.


Thanking you.





 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 28 Jul 2008, 11:16 AM
Hello Hrushikesh,

Please check the attached file (it is modified version of your default.aspx) which illustrates the approach.

Kind Regards,
Daniel
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 31 Jul 2008, 11:08 AM
Hi Daniel,

  I tried the code you send. But it showing the loading panel on page view .
I want to show the loading panel on grid of the pageview.

I tried same code with following changes to show loading panem on grid it give me error
as
''Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_Content_ctl00_Content_RadGrid1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel."


      <telerik:RadAjaxManager ID="rdAjaxManagerHistoryGrid" runat="server" Style="display: block"
            DefaultLoadingPanelID="LoadingPnlCustom">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                          </AjaxSettings>
        </telerik:RadAjaxManager>

How can i show the loading panel on grid of pageview on tab click?

Thanking you.
                                      
                    
 
0
Daniel
Telerik team
answered on 04 Aug 2008, 04:53 PM
Hello Hrushikesh,

Please check if the attached example fulfills your expectations and let me know if I can help you further.

Regards,
Daniel
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
Daniel
Telerik team
Hrushikesh Mokashi
Top achievements
Rank 1
Share this question
or