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.

Where does the changed values on UI get stored?

Thread ID:

Created:

Updated:

Platform:

Replies:

17771 Aug 16,2004 04:52 PM Aug 17,2004 07:50 AM Windows Forms 3
loading
Tags: GridControl
James Tran
Asked On August 16, 2004 04:52 PM

I have a grid control that I populate using PopulateValues and giving it an array datasource. I have a CurrentCellCloseDropDown event in which I try to compare the newly select value with the previously selected value of the cell. I can get the newly selected value of the cell by doing: GridCurrentCell cc = m_GridControl.CurrentCell; cc.Renderer.ControlValue; However, I can''t find where the previous value of the cell is stored. When I look at the grid control or the datasource using indexers, they always have the initial values and not any of the new values. Where are user changed values stored for the cells?

Administrator [Syncfusion]
Replied On August 16, 2004 05:14 PM

Using an indexer on the gridControl should return any changed value (after you have moved off the cell). string oldValue = this.m_gridControl[cc.RowIndex,cc.ColIndex].Text;

James Tran
Replied On August 17, 2004 07:31 AM

I must be doing something wrong but that doesn''t work for me. I have attached a sample project. To got row 23 in the grid and change the second dropdown. A break point has already been set in the event. I still get the old value and not the new value. Change it again and you will still see the original value and not either of the two new values. CS_4279.zip

Administrator [Syncfusion]
Replied On August 17, 2004 07:50 AM

You should get the old value at this point. (Your orignail post described not being able to get the old value???) The indexer gives you the old value while the cell is actively being edited. The newvalue is not moved to the grid until you leave the cell (or call cc.ConfirmChanges()). When the cell is actively being edited, you can get the new value using cc.Renderer.ControlText. GridCurrentCell cc = gridControl1.CurrentCell; object oldValue = gridControl1[cc.RowIndex, cc.ColIndex].CellValue; object newValue = cc.Renderer.ControlText; Console.WriteLine(oldValue + " " + newValue);

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.

;