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

Tabs and performance

3 Answers 36 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Aarsh
Top achievements
Rank 1
Aarsh asked on 06 Oct 2013, 03:43 PM
I have a dashboard on one tab which loads some data from SQL if I close that tab and open a new tab which has a search screen, I still get a 'hit' on a debug point for that dashboard page ... so closing that dashboard tab does not actually stop processing and spending memory/resources for that page ?

Do we have some setting or property to prevent this behaviour ?

3 Answers, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 07 Oct 2013, 10:33 AM
I don't know if this is the approved or best way of doing it, but I failed to find anything in the documentation to help me out so..

I did this:

-Give each MultiPage PageView a different ID, eg. <telerik:RadPageView ID="SQLDataStuff" runat="server">

-Then in page_load in your C# (or VB), you can do this (using the Events page from above):

if(SQLDataStuff.Selected)
{
//do mysql things
}

Then if your Tab with the SQL is not selected, the code won't run.

Hope that helps.



0
Aarsh
Top achievements
Rank 1
answered on 07 Oct 2013, 02:14 PM
Well, I tried to say something different, let me rephrase it :
Lets assume I have following code :

<telerik:RadTabStrip ID="radTabMain" runat="server" Width="100%" OnTabClick="radTabMain_TabClick">
            <Tabs>
                <telerik:RadTab Text="Dashboard" runat="server" Url="Dashboard.aspx">
                </telerik:RadTab>
                <telerik:RadTab Text="AboutUs" runat="server" Url="AboutUs.aspx">
                </telerik:RadTab>
                <telerik:RadTab Text="Contact Us" runat="server" Url="ContactUs.aspx">
                </telerik:RadTab>
                <telerik:RadTab Text="Feedback" runat="server" Url="Feedback.aspx">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>

and I have made the dashboard to be the default tab when user logs in.

The dashboard does few database queries and shows result upon execution of some method on page_load event, say LoadData() is the function name. and I have breakpoints set on the opening and closing curly braces of the function LoadData().

That said, now if I run my application and log in, as expected dashboard tab does come up and load the data ... fine.

But if I close the tab even before I got hit on my breakpoint laying on the opening brace of the LoadData() function, and open a new tab say about-us from rad menu I would get a hit on BOTH of the breakpoints of LoadData() function.

So in my understanding even if I closed the dashboard tab and opened a simple page who does not do any interaction with database, I still be having to wait for the Database operation on Dashboard's LoadData() function ... the page I already have closed and is not of my use ?

I hope this makes my question clear


Thanks for any help,
-Aarsh
0
Aarsh
Top achievements
Rank 1
answered on 14 Oct 2013, 09:48 AM
...
Tags
TabStrip
Asked by
Aarsh
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Aarsh
Top achievements
Rank 1
Share this question
or