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.

Summary row valus is not giving Correct value

Thread ID:

Created:

Updated:

Platform:

Replies:

76385 Sep 4,2008 06:45 AM Sep 20,2008 06:47 AM Windows Forms 3
loading
Tags: Grouping
Ankit Thakkar
Asked On September 4, 2008 06:45 AM

I am trying to put a summary row on one of my grid columns.
Column type is boolean. So ideally my summary row should display the count of check boxes which are ticked, When I tick the check box, the count is getting increased by one but when I uncheck it, the count is not decreasing but shows the same value.

Below is my code. pls let me klnow if I am doing anything wrong.


GridSummaryColumnDescriptor SG1 = new GridSummaryColumnDescriptor("True", SummaryType.BooleanAggregate, "WayStoreGrade1_Catalogued", "{Count}");

thanks..


SubhaSheela R [Syncfusion]
Replied On September 5, 2008 01:57 AM

Hi Ankit,

Thanks for your intetest in Syncfusion products.

You can handle TableControlCurrentCellMoved event and call EndEdit of the GridGroupingControl.

Here is the code:


void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.TableControl.CurrentCell.EndEdit();
this.gridGroupingControl1.Table.TableDirty = true;
}


Here is the sample that illustrates the same:

http://www.syncfusion.com/support/user/uploads/GGC_Custom_Summary_e5f93008_1f4bf171.zip

Please let me know if this helps.

Regards,
Subhasheela R




Ankit Thakkar
Replied On September 7, 2008 10:04 AM

Hi,
Thanks for your response.
This is working for summaries in the Parent table. However, I am having summaries in my Child table. Somehow this code is not working for Child table summaries. I could see that summary values are getting refreshed only after leaving the cell and that too it is not getting refreshed when I click on other cell in the same row.
The value is getting refreshed only when I click on some other row. Is there any way to fix this..

Thanks..


>Hi Ankit,

Thanks for your intetest in Syncfusion products.

You can handle TableControlCurrentCellMoved event and call EndEdit of the GridGroupingControl.

Here is the code:


void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.TableControl.CurrentCell.EndEdit();
this.gridGroupingControl1.Table.TableDirty = true;
}


Here is the sample that illustrates the same:

http://www.syncfusion.com/support/user/uploads/GGC_Custom_Summary_e5f93008_1f4bf171.zip

Please let me know if this helps.

Regards,
Subhasheela R






Sri Rajan [Syncfusion]
Replied On September 20, 2008 06:47 AM

Hi Ankit,

Thank you for your interest in Syncfusion products.

The cell value gets update to the underlying datasource only when you move to a cell in the another row, not when focus move to a cell in the same row. Please try this code to update the summary values of the Parent and Child Table when focus moves to a another cell in the same row after making changes.


void gridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e)
{
this.gridGroupingControl1.Table.TableDirty = true;
this.gridGroupingControl1.Table.SummariesDirty = true;
this.gridGroupingControl1.GetTable("ChildTable").SummariesDirty = true;
this.gridGroupingControl1.GetTable("ChildTable").TableDirty = true;
}



Best Regards,
Srirajan.


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.

;