Author Topic: RefreshRow is not working properly  (Read 3394 times)

bsolteam

  • Pro Deluxe
  • Full Member
  • *
  • Posts: 107
    • View Profile
RefreshRow is not working properly
« on: September 01, 2014, 08:00:01 pm »
Hi,
      I have a grid inside the tab. totally 8 tabs are there. First 3 tabs are getting the values from database. Other tabs are getting calculated values from the first 3 tab. When am changing the value in 1st tab it will reflect the calculated value in 4,5,6 tabs. As of now am refreshing the tab at that time of clicking the tabs. Ex second tab grid has been refreshed by using the following code.
Code: [Select]
if(ui.newTab.index()==2)
                               {
                        var $grid=$("#VoyageDetails_tab_main");
                       $grid.pqGrid("refresh");
                               }
   My data length is keep on increasing because of inserting new rows. So am facing performance related issue. In my 4th tab I have 6 grids one by one. So when am clicking 4th tab, it is taking more than 6 sec. For 4th tab refreshing am using the following code.
Code: [Select]
if(ui.newTab.index()==3)
                               {
                          var $grid=$("#standardVoyages1_tab_main");
                        $grid.pqGrid("refresh");
                        var $grid=$("#standardVoyages2_tab_main");
                        $grid.pqGrid("refresh");
                        var $grid=$("#standardVoyages3_tab_main");
                       $grid.pqGrid("refresh");
                    var $grid=$("#standardVoyages4_tab_main");
                    $grid.pqGrid("refresh");
                    var $grid=$("#standardVoyages5_tab_main");
                    $grid.pqGrid("refresh");
                    var $grid=$("#standardVoyages6_tab_main");
                    $grid.pqGrid("refresh");
                               }
If I removed this refresh, when I am clicking this tab it is showing no rows. I tried to give RefreshRow after I completed the calculation of line. But it is not working properly [ I have attached the snapshot].  Please help me to overcome this performance related issue.
« Last Edit: September 01, 2014, 08:06:27 pm by bsolteam »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: RefreshRow is not working properly
« Reply #1 on: September 02, 2014, 04:56:29 pm »

bsolteam

  • Pro Deluxe
  • Full Member
  • *
  • Posts: 107
    • View Profile
Re: RefreshRow is not working properly
« Reply #2 on: September 15, 2014, 08:39:26 pm »
Hi Team,
  Still am facing the same issue. I tried with virtualY and virtualX. If I used this then also my screen displaying the same what I have attached in previous. I need to scroll on that page. Then only my data's are displaying in screen. If I do a refresh at the time of clicking the tab entire thing is working properly. But it is taking more time to open the tab. I don't want to do the refresh at the time of clicking the tab. I want to refresh my grid rows at the time of doing calculation or somewhere. I want to reduce my time for opening tab. I have used refreshrow function in another grid. which is having less amount of data(only 6 rows). For that it is working fine. Why it is not working for huge amount of data's. Please give some ideas to overcome this.   

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: RefreshRow is not working properly
« Reply #3 on: September 16, 2014, 10:56:11 am »
refreshRow should be avoided when there are lot number of rows for performance reasons and refresh should be used instead.

In virtual mode the refresh should not take more than a second even when there are 6 grids with million rows.

Please check your code and ensure that your grids are not refreshed multiple times. Please create a similar jsfiddle which would help me to review your code.

Take this as a starting point:

http://jsfiddle.net/paramquery/wruocf6t/2/