Professional UI Solutions
Site Map   /  Register


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 with every field behaving like an edit-control? Collapse All
Subject Author Date
Krustys Donuts Feb 19, 2008 - 8:21 PM

I need to create a 2-column grid where every cell in the grid is editable just by moving keyboard focus there.

The Property Grid doesn’t seem to work for this, because the left column isn’t editable.
The CExtGridWnd doesn’t seem to work for this, because in-place editing of any string-type cell requires double clicking or pressing Enter when the cell has focus.
The Report grid doesn’t seem to be editable at all, as far as I can tell.

None of the Sample Code I’ve looked through has anything in it like what I’m looking for.
Is there a way to do this with any of the existing Prof-UIS classes?


Technical Support Feb 21, 2008 - 5:42 AM

You can apply the following set of styles using CExtGridWnd::BseModifyStyle(): __EGWS_BSE_EDIT_AUTO|__EGWS_BSE_WALK_HORZ|__EGWS_BSE_WALK_VERT.

The __EGWS_BSE_EDIT_AUTO style activates the inplace cell editor automatically when the user starts typing. The later two styles allow you to move focus from one cell to another cell with the inplace editor activated automatically. You can edit cell’s text and put tje editor’s cursor to the end of the textn. Pressing the right arrow key activates the editor in the next column. The same is similar to the left direction. This behavior is provided by __EGWS_BSE_WALK_HORZ. The __EGWS_BSE_WALK_VERT style is similar and have to do with the up and down arrow keys.