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 General Discussion » Grid Class Collapse All
Subject Author Date
Nader Mimouni Dec 13, 2006 - 11:55 AM

Hello,

Good day,

I have two questions regarding Grid class :
- How can I define the grid to allow cells in some column be modified and cells in the others column cannot be modified locally ?
- How can I check and validate the changed value of one cell once it lost focus ?

And many thanks for your support.

Suhai Gyorgy Dec 14, 2006 - 4:23 AM

- When you are initializing the grid’s cells (setting type and value of cell), you can call pCell->ModifyStyle(__EGCS_READ_ONLY); or pCell->ModifyStyle(__EGCS_NO_INPLACE_CONTROL); to deny modifying of that particular cell. There’s no way of setting a whole column readonly with only one call, you have to do it cell by cell.

- It’s not exactly clear what you are asking, but I think you need to override OnGbwFocusChanged or OnGbwFocusChanging methods of the grid. Both method’s first parameter is POINT ptOldFocus, which gives you the row and column number of the cell lost/losing focus. In that overriden method you can check and validate the value of cell.