AD
Administrator
Syncfusion Team
January 25, 2005 07:11 PM UTC
Anthony,
you can get the current cell value from
e.TableControl.CurrentCell.Renderer.ControlValue
or the display text:
e.TableControl.CurrentCell.Renderer.ControlText
if you want to commit pending current cell changes into the underlying cell style you could call
e.TableControl.CurrentCell.ConfirmChanges();
Stefan
AA
Anthony Avella
January 26, 2005 02:32 PM UTC
I''m having a problem with the summary cell updating with the new value.
After the first change in the combobox, the value does not change.
When I change it a second time, the first change appears in the summary cell.
How do I correct this??
Here is the code I''m using in the event handler:
if(gs.TableCellIdentity.DisplayElement is CustomCaptionRow)
{
strColumnName = gs.TableCellIdentity.SummaryColumn.DataMember;
objNewCellValue = e.TableControl.CurrentCell.Renderer.ControlValue;
//the commented out function call updates the detail rows under this summary row for this column
//UpdateGroupDetailRecords(gs.TableCellIdentity.DisplayElement.ParentGroup, strColumnName, objNewCellValue);
e.TableControl.CurrentCell.Renderer.StyleInfo.CellValue = e.TableControl.CurrentCell.Renderer.ControlText;
e.TableControl.CurrentCell.ConfirmChanges(true);
}
Thanks.
>Anthony,
>
>you can get the current cell value from
>
>e.TableControl.CurrentCell.Renderer.ControlValue
>
>or the display text:
>
>e.TableControl.CurrentCell.Renderer.ControlText
>
>if you want to commit pending current cell changes into the underlying cell style you could call
>
>e.TableControl.CurrentCell.ConfirmChanges();
>
>Stefan
>
AD
Administrator
Syncfusion Team
January 26, 2005 04:12 PM UTC
Does
e.TableControl.CurrentCell.Renderer.ControlText;
return the correct value? You could add a Console.WriteLine and check it.
The line
e.TableControl.CurrentCell.Renderer.StyleInfo.CellValue = e.TableControl.CurrentCell.Renderer.ControlText;
is not needed. You only need
e.TableControl.CurrentCell.ConfirmChanges(true);
Once you call ConfirmChanges your SaveCellInfo handler should be hit and in that handler you should then save the value in your custom array that you have implemented in your group.
Stefan
AA
Anthony Avella
January 26, 2005 04:42 PM UTC
Yes it does return the correct value.
I did not notice before (because I didn''t try to do it) that when I leave the summary cell after changing the value, the correct (new) value appears in the cell when it should.
How can I make this happen without leaving the cell?
>Does
>
>e.TableControl.CurrentCell.Renderer.ControlText;
>
>return the correct value? You could add a Console.WriteLine and check it.
>
>The line
>e.TableControl.CurrentCell.Renderer.StyleInfo.CellValue = e.TableControl.CurrentCell.Renderer.ControlText;
>
>is not needed. You only need
>
>e.TableControl.CurrentCell.ConfirmChanges(true);
>
>
>Once you call ConfirmChanges your SaveCellInfo handler should be hit and in that handler you should then save the value in your custom array that you have implemented in your group.
>
>
>Stefan
>
AD
Administrator
Syncfusion Team
January 26, 2005 06:16 PM UTC
e.TableControl.CurrentCell.ConfirmChanges(true);
or
e.TableControl.CurrentCell.EndEdit()
will force saving the ControlText into the underlying style and your SaveCellInfo handler should get hit.
Stefan