This is a migrated thread and some comments may be shown as answers.
Performance Issue in Binding NestedGrid
6 Answers 47 Views
This is a migrated thread and some comments may be shown as answers.
John John
Top achievements
Rank 1
John John asked on 30 Mar 2010, 03:35 PM

Dear Telerik,

            I am facing big blow in my applications performance with NestedGrid.

I am having the parent grid and it has four nested grids. Each nested grid placed in each tab section with the help of multipage.

 

As per the Telerik direction I used the Parentgrid’s pre_render event to bind all the child or nested grids as the code given below

 

 

protected void ParentGrid_PreRender(object sender, EventArgs e)  
{  
    foreach (GridDataItem item in ParentGrid.MasterTableView.Items)  
          {                
                if (item.Expanded)  
                {  
                  //foreach (GridNestedViewItem item1 in RadFirmGrid.MasterTableView.GetItems(GridItemType.NestedView))  
                  //{  
                    GridNestedViewItem item1 = RadFirmGrid.MasterTableView.GetItems(GridItemType.NestedView)[item.ItemIndex] as GridNestedViewItem;  
                      
                    // Binding Cutomer grid      
                    RadGrid Child1 = (RadGrid)item1.FindControl("Customer");  
          
                    // Binding Products grid      
                    RadGrid Child2 = (RadGrid)item1.FindControl("Products");  
 

 

But my application seemed is loading very slowly for each time the operation of grids or child grids Edit, grouping/sorting operation has been done. Because it calls parent grids pre_render event, then binds all the child grids again.

 

Note: Based on the above mentioned code logic, the grids expanded loops to be done as much of the time number of items I expanded. So again binding occurs as much time.

 

So how can I make my application more optimistic? Whether it would be ok if I bind the nested grid for each respective tab is selected. if i did that will the performance be ok. If so how can I achieve it?

So please direct me to solve the issue of performance with some sample of code.

 

Help would be appreciated..

 

Regards,

John            

6 Answers, 1 is accepted

Sort by
0
Stacy
Top achievements
Rank 1
answered on 30 Mar 2010, 03:57 PM
I am having the same issue.  I store data in a DataSet and stick that into my viewState.  I tried using both ajaxafied server and client side API but, i don't see any performance advantage either ways.  It would be nice to store all the data in json or something and render the expanding hierarchy in client-side code.  Especially on a slow network.

I hope someone can post a good article to address this issue.

~Stacy
0
John John
Top achievements
Rank 1
answered on 31 Mar 2010, 08:00 AM
Hi Stacy,

              Managing the issue with the help of view state, may not be good work to handle the issue.
So let us welcome the opinion through telerik team or from others who faces the sames scenario.

-Thanks
0
John John
Top achievements
Rank 1
answered on 01 Apr 2010, 10:59 AM
Hi,

      Any suggession to control the loading time of the grid. Is there any way as we can optimize the code in order to run the application smoothly

Thanks,
John
0
John John
Top achievements
Rank 1
answered on 05 Apr 2010, 01:10 PM

Dear Telerik,

            Is there any way to bind the child (or) nested grid based on the corresponding tab selected?

Say example, if I select the first tab of the nested grid the respective grid need to be bind only that time rest grids not need to bind. Suppose if I go to the second tab then the only that time the second grid need to bind mean while the first tab grid data need to be set nothing or clear.

 

Whether the above mentioned way would help to achieve the speed or performance of the grid. If so point out how we can achieve the scenario.

 

-Thanks

0
John John
Top achievements
Rank 1
answered on 06 Apr 2010, 03:31 PM
Hi,
          any suggessions?
-Thanks
0
John John
Top achievements
Rank 1
answered on 07 Apr 2010, 03:41 PM
Dear Telerik,
                 we are looking for yours good suggessions regarding the post as mentioned above,

Regards,
John
Tags
Grid
Asked by
John John
Top achievements
Rank 1
Answers by
Stacy
Top achievements
Rank 1
John John
Top achievements
Rank 1
Share this question
or