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 » OnGbwBeginEdit is not called when I double-click a cell in CExtGridWnd Collapse All
Subject Author Date
Scott Moore Feb 2, 2009 - 3:32 PM

Why doesn’t OnGbwBeginEdit get called before editing begins on a cell?  I need to detect when a user is about to edit a cell so I can determine if the input should be masked or not (e.g., password field).

Technical Support Sep 24, 2010 - 3:20 AM

Could you insert your grid initialization code into this simple test project and send it to us?

http://www.prof-uis.com/download/forums/ForMarianne.zip

Ed Nafziger Sep 22, 2010 - 1:39 PM

OnGbwBeginEdit is not called in my custom class.
I am convinced it did work properly when using prior versions of Prof-UI.
I am currently using 2.89.
I have tried various combinations of the editing style flags.
I want to avoid setting the cell to read-only, because I do not want the cell to appear grayed-out.

Here is my normal setup:
ReportColumnProportionalResizingSet( true, false );
SiwModifyStyle( __EGBS_GRIDLINES_H,    0, true ); // enable horizontal grid lines
BseModifyStyle( __ENABLE_CELLEDITING_BSE_STYLES__ ); // enable cell editing
ReportGridModifyStyle( 0,    __ERGS_ENABLE_COLUMN_CTX_MENU, false ); // disable column context menu
ReportGridModifyStyle( 0,    __ERGS_ENABLE_COLUMN_LIST_IN_CTX_MENU, false ); // disable field chooser

I tried:
BseModifyStyle( __ENABLE_CELLEDITING_BSE_STYLES__ | __EGWS_BSE_EDIT_SINGLE_LCLICK ); // enable cell editing

and:
BseModifyStyle( __ENABLE_CELLEDITING_BSE_STYLES__ | __EGWS_BSE_EDIT_SINGLE_LCLICK | __EGWS_BSE_EDIT_DOUBLE_LCLICK ); // enable cell editing

Technical Support Feb 3, 2009 - 12:31 PM

You should apply the __EGWS_BSE_EDIT_DOUBLE_LCLICK style to your grid window using its CExtGridWnd::BseModifyStyle() method. This style is present in the grid by default because it’s listed in the definition of the __EGWS_BSE_DEFAULT preprocessor variable. Please check whether you removed this style during grid initialization.