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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Where does the changed values on UI get stored?

Thread ID:





17771 Aug 16,2004 08:52 PM UTC Aug 17,2004 11:50 AM UTC WinForms 3
Tags: GridControl
James Tran
Asked On August 16, 2004 08:52 PM UTC

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 09:14 PM UTC

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 11:31 AM UTC

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 11:50 AM UTC

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);


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon