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.
Unfortunately, activation email could not send to your email. Please try again.

Grouping grid summary rows are not getting refreshed

Thread ID:

Created:

Updated:

Platform:

Replies:

57331 Mar 1,2007 12:01 PM Mar 9,2007 05:17 PM Windows Forms 6
loading
Tags: Grouping
Sachin Bamel
Asked On March 1, 2007 12:01 PM

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

Administrator [Syncfusion]
Replied On March 1, 2007 12:25 PM

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

Sachin Bamel
Replied On March 7, 2007 12:07 PM

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

Sachin Bamel
Replied On March 7, 2007 02:16 PM

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


Administrator [Syncfusion]
Replied On March 7, 2007 04:29 PM

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

Sachin Bamel
Replied On March 8, 2007 12:21 PM

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

Administrator [Syncfusion]
Replied On March 9, 2007 05:17 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;