Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to get Row/Column number in a CExtGridCellString-derived class member function ? Collapse All
Subject Author Date
Vincent Lin Jan 31, 2007 - 8:43 PM

I has create a CExtGridCellString-derived class, and override TextSet().
I want to get the Row/Column number while the cell is changed.
How can I get the Row/Column number in my class member TextSet() ?
thanks.

Technical Support Feb 1, 2007 - 11:42 AM

A particular CExtGridCell object knows nothing about its location in the grid. The only one way is to traverse all the cells and compare these cell objects with this cell itself. If you need to know the cell location when the user changes its value, the TextSet() method is not good for this. There is an OnInplaceControlTextInputComplete() virtual method which notifies the cell object when the in-place editor gets closed. In this method the nColNo and nRowNo parameters allows you to get the cell’s coordinates. Please note that you can also override the CExtGridWnd::OnGridCellInputComplete() method which is invoked when a cell has been changed.