We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grouping grid summary rows are not getting refreshed

Hi

I recently migrated from syncfusion 2.1.0.9 to syncfusion 4.2. I am having an issue with grouping grid with 4.2. My summary row is not getting refreshed and I am not seeing real time update of summary rows as well as grouped rows. This used to work fine with older version. With the analysis it seems to me that the refresh of summary rows dont happen when the rows are collapsed but it works fine when rows are expanded. Can somebody please help.

Thanks,
Sachin

6 Replies

AD Administrator Syncfusion Team March 1, 2007 05:25 PM UTC

Hi Sachin,

This can be resolved by calling the refresh method in the CurrentRecordContextChange event. Please try this code snippet and let me know if this helps.

this.gridGroupingControl1.CurrentRecordContextChange += new CurrentRecordContextChangeEventHandler(gridGroupingControl1_CurrentRecordContextChange);

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if (e.Action == CurrentRecordAction.EndEditComplete)
{
e.Record.InvalidateCounterBottomUp();
this.gridGroupingControl1.Refresh();
}
}

For more details refer to broswer sample ( \\windows\Grid.Grouping.Windows\Samples\CustomSummary )

Best Regards,
Haneef


SB Sachin Bamel March 7, 2007 05:07 PM UTC

Hi Haneef,

we are already implementing the event CurrentRecordContextChangeEventHandler mentioned by you . But this event will get called only when user navigate to a different tab . In our case

if( e.Action == CurrentRecordAction.NavigateComplete )
{
OnCurrentRecordChanged();
}


In our application user will not edit in the grid as is seen in your sample, but instead the model gets updated in code real time & we need to refresh the summary. This used to be working fine for 2.1.0.9 but it dont work for 4.2. Non summary rows are getting refreshed correctly . Also as mentioned earlier if the grouping grid is collapsed in that case the summary gets refreshed properly.

I am attaching the 2 files from code which implements the grouping grid.

Thanks,
Sachin

>Hi Sachin,

This can be resolved by calling the refresh method in the CurrentRecordContextChange event. Please try this code snippet and let me know if this helps.

this.gridGroupingControl1.CurrentRecordContextChange += new CurrentRecordContextChangeEventHandler(gridGroupingControl1_CurrentRecordContextChange);

private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if (e.Action == CurrentRecordAction.EndEditComplete)
{
e.Record.InvalidateCounterBottomUp();
this.gridGroupingControl1.Refresh();
}
}

For more details refer to broswer sample ( \\windows\Grid.Grouping.Windows\Samples\CustomSummary )

Best Regards,
Haneef


SB Sachin Bamel March 7, 2007 07:16 PM UTC

I observed that when I click on column header to sort, my summary starts getting refreshed. Any idea what is the reason for it.



AD Administrator Syncfusion Team March 7, 2007 09:29 PM UTC

Hi Sachin,

By default, the summaries should be refreshed as you leave the row (not the cell). If you want the summaries updated as you leave the cell , you can add a CurrentRecordContextChange event handler, and trigger the actions there.

private void grid1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.CurrentFieldChanged
|| e.Action == CurrentRecordAction.EndEditComplete )
{
this.gridGroupingControl1.CurrencyManager.EndCurrentEdit();
this.gridGroupingControl1.Table.SummaryDirty = true;
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Table.InvalidateSummary();
}
}

To update the summaries as you change the underlying datasource, Please refer to the below form thread.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=20247

Best Regards,
Haneef


SB Sachin Bamel March 8, 2007 05:21 PM UTC

Hi Haneef,

CurrentRecordContextChange do not get called when the grid model table gets updated. Can you tell me which event should I put the logic to refresh the summary. As I mentioned to you when I click on header for sort the refresh work for summaries. Can you tell me which event gets fired when I click on column header which set model table or summary to dirty.




>Hi Sachin,

By default, the summaries should be refreshed as you leave the row (not the cell). If you want the summaries updated as you leave the cell , you can add a CurrentRecordContextChange event handler, and trigger the actions there.

private void grid1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.CurrentFieldChanged
|| e.Action == CurrentRecordAction.EndEditComplete )
{
this.gridGroupingControl1.CurrencyManager.EndCurrentEdit();
this.gridGroupingControl1.Table.SummaryDirty = true;
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Table.InvalidateSummary();
}
}

To update the summaries as you change the underlying datasource, Please refer to the below form thread.
http://www.syncfusion.com/support/Forums/message.aspx?MessageID=20247

Best Regards,
Haneef


AD Administrator Syncfusion Team March 9, 2007 10:17 PM UTC

Hi Sachin,

We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon