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

Best way to accomplish fast loading

4 Answers 61 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Rob Himself
Top achievements
Rank 1
Rob Himself asked on 25 Jun 2010, 07:59 PM
So within my project I have an aspx page with one RadDockZone and three RadDocks within. Inside each RadDock is a web user control containing a TabStrip. Within each tab are two RadGrids. If I only drop the controls on the page and set the bare minimum to get the grids populated, it takes around a minute or so for the page to even appear. This is to be expected with the sheer number of grids that are just loading whether they can be seen (remember, they're in tabs) initially or not.

My idea is that when each web user control loads, it will only populate the RadGrids on the first tab. When a different tab is clicked, it will go out behind the scenes (AJAXily) and load whichever tab's grids was clicked on.

My question is multi-part:
1. Am I on the right track for fast loading? Are there any better ideas?
2. What's the fastest way to load a RadGrid? Client-side WebService? LINQ?
3. Are there any brief examples of this in the code library?

Thank you very much in advance. I hope my question was clear enough.

4 Answers, 1 is accepted

Sort by
0
Rob Himself
Top achievements
Rank 1
answered on 29 Jun 2010, 02:43 PM
No suggestions? :) Let me try again to explain. I know it sounds confusing.

- There are three docks.
-- Each dock has a tabstrip of three or so tabs (with associated tabpages). Some of those tabs have subtabs, also with their own tabpages.
---Each tabpage has two radgrids.

All in all, there's the potential for about twenty-something radgrids. I was handed the code to load it all on the server-side using only the NeedDataSource method, meaning I need some way to stall out the loading of every grid except those that live within the first tab of each tabstrip. I was hoping that when the user clicks each tab it would then go ahead and load that tab's grids.
0
Veli
Telerik team
answered on 30 Jun 2010, 09:58 AM
Hi Rob,

These are quite a few RadGrid instances instantiated. There are plenty of approaches you can take for optimizing this, and you are definitely encouraged to do so.

One approach is to keep the regular RadGrid databinding you have been using, but use RenderSelectedPageViewOnly="true" in the RadMultiPage settings. This will have the hidden page views not render before the respective tabs are clicked.

Another approach you can use is RadGrid client-side databinding. This will have the page render less HTML initially and each RadGrid will be databound on the client after the page loads.

You can also combine these two approaches for maximum rendering performance: render only RadGrid in visible page view and bind it on the client-side.

In any case, you are discouraged from initializing that many RadGrid instances in a single page, so loading page view content on demand is highly recommended.

Regards,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rob Himself
Top achievements
Rank 1
answered on 30 Jun 2010, 09:43 PM
Veli,

Brilliant. I very much appreciate the suggestion regarding the RenderSelectedPageViewOnly property. On that note, however, I could not find an example of this in the demos. This works perfectly for me with the exception that when I switch tabs, the page view becomes blank. In light of this, can you point me to an example that will page flip and load the contents?

This weekend I will most likely make an attempt at client-side databinding.

Thank you again. You've been most helpful.
0
Yana
Telerik team
answered on 05 Jul 2010, 02:09 PM
Hello Rob,

You should allow the tabstrip to postback in order to use RenderSelectedPageViewOnly property, so make sure that you either subscribe the tabstrip to TabClick event or set its AutoPostBack property to true.
Hope this helps.

All the best,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Dock
Asked by
Rob Himself
Top achievements
Rank 1
Answers by
Rob Himself
Top achievements
Rank 1
Veli
Telerik team
Yana
Telerik team
Share this question
or