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.

drop downs

Thread ID:

Created:

Updated:

Platform:

Replies:

23933 Jan 25,2005 07:34 AM Jan 26,2005 01:16 PM Windows Forms 5
loading
Tags: Grouping
Anthony Avella
Asked On January 25, 2005 07:34 AM

I''m using the newest version of your grid. I have a drop down menu as a column in a summary row. How can my code access the new value of the cell (i.e.: the value the user changed the cell to from the drop down choices)? I''m trying to access it during the grid_TableControlCurrentCellCloseDropDown event. I also notice that when the user tries to change a value in a drop down the value in the cell does not change. How can I correct this problem? Thanks.

Administrator [Syncfusion]
Replied On January 25, 2005 02:11 PM

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

Anthony Avella
Replied On January 26, 2005 09:32 AM

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 >

Administrator [Syncfusion]
Replied On January 26, 2005 11:12 AM

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

Anthony Avella
Replied On January 26, 2005 11:42 AM

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 >

Administrator [Syncfusion]
Replied On January 26, 2005 01:16 PM

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

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.

;