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

Dashboard with multiple threads

7 Answers 158 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 30 Jul 2008, 02:48 PM

Hi,

I have created the dash board page, using telerik charts

Telerik version : RadControls for ASPNET AJAX Q1 2008
 and visual studio 2008 / sqlserver.

I have 10 user controls having charts.
In the dash board page I am creating the zones and dock controls runtime and inside dock

control, binding the user controls.

Now when i moved to the dash board page it calls all the 10 stored proc to bind the  charts

which is in usercontrol one by one and display the dashboard page simultaneously.

What i want is to call all the 10 stored proc simultaneously and display that one by one as

loaded.
Like igogle they load the dashboard page and uses the loading image to the items which takes

time to load.

can any body help me.

7 Answers, 1 is accepted

Sort by
0
Michael Josiah
Top achievements
Rank 1
answered on 31 Jul 2008, 12:27 AM
I am also looking for a solution for this. Anyone from the Telerik team able to shed some light on this. Do we need to load each load asyncronasly? If so any ideas how?
0
Todd Anglin
Top achievements
Rank 2
answered on 31 Jul 2008, 12:45 AM
Rahul-

Sounds like you need some Ajax. :) I suggest you load your most important chart(s) on initial page load and then use some JavaScript to fire some Ajax methods to load your other charts after the page is fully loaded.

To do that, you can use ASP.NET AJAX's pageLoad() client event, which always fires when the page is finished loading. From there, you can write some JS that takes advantage of the RadAjaxManager client-side Ajax event. Check out this demo for examples of firing Ajax events from JS code:


If you want to take an even more advanced approach, you can use ASP.NET AJAX to easily return your chart image data via web services. To access the chart image data, check-out the Save method on RadChart.

Hope that helps get you started. Let me know if you get stuck.

-Todd

0
vivek
Top achievements
Rank 1
answered on 27 Aug 2008, 01:19 PM

I am creatiing the zones and docks at runtime through database
the code is below 

public void BuildTab()

{

try

{

hvCurrentTabName.Value = RadTabStrip1.SelectedTab.Text.ToString();

DataSet ds = new DataSet();

DataAccess objDataAccess = new DataAccess();

ds = objDataAccess.proc_dashGet_Zones_User(RadTabStrip1.SelectedTab.Text.ToString(), UserID);

int ZonCount = ds.Tables[0].Rows.Count;

for (int i = 0; i < ZonCount; i++)

{

RadDockZone NewRadZone = new RadDockZone();

NewRadZone.EnableViewState =

true;

NewRadZone.ID = ds.Tables[0].Rows[i][

"AccountUserZoneId"].ToString() + "_Zone";

string strZoneType = ds.Tables[0].Rows[i]["ZoneType"].ToString();

if (strZoneType == "V")

{

NewRadZone.Orientation =

Orientation.Vertical;

int ZminH = Convert.ToInt32(ds.Tables[0].Rows[i]["VerticalZoneMinHeight"].ToString());

NewRadZone.MinHeight = ZminH;

int ZWidth = Convert.ToInt32(ds.Tables[0].Rows[i]["VerticalZoneWidth"].ToString());

NewRadZone.Width = ZWidth;

}

else

{

NewRadZone.Orientation =

Orientation.Horizontal;

int ZHeight = Convert.ToInt32(ds.Tables[0].Rows[i]["HorizontalZoneHeight"].ToString());

NewRadZone.MinHeight = ZHeight;

int ZMinWidth = Convert.ToInt32(ds.Tables[0].Rows[i]["HorizontalZoneMinWidth"].ToString());

NewRadZone.Width = ZMinWidth;

}

NewRadZone.FitDocks =

true;

NewRadZone.Style.Add(

"float", "left");

NewRadZone.Style.Add(

"margin-right", "0px");

NewRadZone.BorderWidth = 0;

NewRadZone.BackColor = System.Drawing.

Color.White;

int AccountUserZoneId = Convert.ToInt32(ds.Tables[0].Rows[i]["AccountUserZoneId"].ToString());

DataSet dsZone = new DataSet();

dsZone = objDataAccess.proc_dashGet_DashboardDetails_User(AccountUserZoneId);

int DockCount = dsZone.Tables[0].Rows.Count;

for (int j = 0; j < DockCount; j++)

{

RadDock NewRadDock = new RadDock();

NewRadDock.EnableViewState =

true;

NewRadDock.ID = dsZone.Tables[0].Rows[j][

"DashboardItemId"].ToString() + "_" + dsZone.Tables[0].Rows[j]["AccountUserDashboardSettingId"].ToString() + "_Dock";

NewRadDock.Title = dsZone.Tables[0].Rows[j][

"DashboardItemName"].ToString() + "-" + dsZone.Tables[0].Rows[j]["DashboardItemId"].ToString();

NewRadDock.Height = 300;

NewRadDock.Width = 310;

NewRadDock.Skin =

"Web20";

NewRadDock.DockMode =

DockMode.Docked;

NewRadDock.ContentContainer.BackColor = System.Drawing.

Color.White;

NewRadDock.DockPositionChanged +=

new DockPositionChangedEventHandler(NewRadDock_DockPositionChanged);

NewRadDock.AutoPostBack =

true;

NewRadDock.ContentContainer.ScrollBars =

ScrollBars.None;

string name ="~/Account/Chart User Controls/" + dsZone.Tables[0].Rows[j]["UserControlName"].ToString() + ".ascx";;

FileInfo objFileifo = new FileInfo(Server.MapPath(name).ToString());

if (objFileifo.Exists)

{

Control userControl = LoadControl(name);

NewRadDock.ContentContainer.Controls.Add(userControl);

}

NewRadZone.Controls.Add(NewRadDock);

}

RadDockLayout1.Controls.Add(NewRadZone);

}

int cnt = RadMultiPage1.PageViews.Count;

RadMultiPage1.PageViews[RadTabStrip1.SelectedIndex].Controls.Add(RadDockLayout1);

}

catch (Exception ex)

{

Response.Write(

"Account_Dashboard.aspx_:BuildTab" + ex.Message.ToString());

}

}

and in user controls i am binding the chats through database.

so when i moved to a dashboard page it creates the zones (get zone info from database) then it creates the docks(get dock info from database) and in dock it adds the user controls
NewRadDock.ContentContainer.Controls.Add(userControl);

And inside every usercontrol I have a code to bind the charts( by calling the stored procs).

But to follow up the above whole procedure it takes lots of time to load/render the charts.
Please give me any way to start with.
Let me know if you want more info about the code and structure.
thanks
Vivek

0
vivek
Top achievements
Rank 1
answered on 29 Aug 2008, 11:17 AM
Can we use iframe in every indidual charts?
Thanks
Vivek
0
Ves
Telerik team
answered on 01 Sep 2008, 08:17 AM
Hi vivek,

How many items do you have in the chart when you are getting the slowdowns? RadChart will have problems with more than 1000 items on screen. While the product was designed to be easily customizable and feature rich it does not cope well with extremely busy charts. There is a trade off to make between high customization and high performance and we've gone the rich features path as it is what most of our customers are interested in.

To check whether the issue is with the charts rendering you can use ASP.NET trace or CLR Profiler and Firebug or a similar plug-in to investigate the client side performance.


Regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
vivek
Top achievements
Rank 1
answered on 02 Sep 2008, 11:22 AM
less than 1000 items in the chart but having 6-8 charts in the same page.
0
Ves
Telerik team
answered on 05 Sep 2008, 03:49 PM
Hello vivek,

Did you try any of the above suggested tools to confirm where the delay comes from? In case it does come from RadChart rendering, did you check Todd's suggestions for async load using AJAX?

Sincerely,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Michael Josiah
Top achievements
Rank 1
Todd Anglin
Top achievements
Rank 2
vivek
Top achievements
Rank 1
Ves
Telerik team
Share this question
or