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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

editing a summary cell

Thread ID:

Created:

Updated:

Platform:

Replies:

49541 Sep 20,2006 10:58 PM UTC Jun 12,2012 12:44 PM UTC WinForms 5
loading
Tags: Grouping
Eric Weber
Asked On September 20, 2006 10:58 PM UTC

Hi,

I have created an editable summary cell. The summary is of type Int32Aggregate. When a user types a value into the summary cell and then hits ENTER or clicks out of the cell, I want the text in the summary cell to reflect the value that was typed into the cell. Currently the cell reverts back to the summary value. I thought about the following solutions...

1. add a hidden row in the detail section that will assume the value typed in to the cell, and then set the real detail cell values to 0.

2. temporarily turn off or supress summarizing

How would you do it?

thanks,

eric

Eric Weber
Replied On September 21, 2006 12:23 AM UTC

I found this discussion, but can''t figure it out...any sample apps?

http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=18703

Administrator [Syncfusion]
Replied On September 21, 2006 05:54 AM UTC

Hi Eric,

You can handle the QueryCellStyleInfo event to set the Style property of the summary cell to make as a editable cell. See the below code snippet for more details.

if(e.TableCellIdentity.TableCellType==GridTableCellType.SummaryEmptyCell || e.TableCellIdentity.TableCellType==GridTableCellType.SummaryFieldCell)
{

e.Style.CellType = "TextBox";
e.Style.BackColor = Color.White

//By default Enable property of summary to False.
//you need to change the Enabled property to True.
e.Style.Enabled = true;

//By default ReadOnly property of summary to True.
//you need to change the ReadOnly property to False.
e.Style.ReadOnly = false;

}

Update the summary using HashTable : http://www.syncfusion.com/Support/user/uploads/GGCSummary_420bb09d.zip

Update the summary using Last record : http://www.syncfusion.com/Support/user/uploads/LastrecUpdateSummaryNavigate_9b080d29.zip

Thanks,
Haneef

Harshad
Replied On March 29, 2007 04:40 PM UTC

I have already done all that you have mention.. As I said I am able edit summary cell unless i click on any record cell...but when i click on the record cell after that i can not edit summary cell it throws me to the record cell earlier selected

haneefm [Syncfusion]
Replied On March 29, 2007 06:40 PM UTC

Hi Harshad,

Try setting the CurrentRecord to null for summary cell in the TableControlCurrentCellStartEditing event of the grid. See if this helps

private void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTableCellStyleInfo style = cc.Renderer.CurrentStyle as GridTableCellStyleInfo;
Element el = style.TableCellIdentity.DisplayElement;

if( el.Kind == DisplayElementKind.Summary )
{
e.TableControl.Table.CurrentRecord = null;
}
}

Please refer to the attached sample for implementation.
GGCSummary.zip

Best regards,
Haneef

Central Support account / Andrew Archer
Replied On June 12, 2012 12:44 PM UTC

I'd like to gain access to the sample above, as I'm facing the same issue.

Thank you.

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.

Warning Icon 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.Close Icon

;