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 » How to make CExtGridCellStringDM cell editable? Collapse All
Subject Author Date
Itay Shahaf Sep 15, 2009 - 9:39 AM


How can I make CExtGridCellStringDM cell editable (so the user will be able to enter text into it)?



Technical Support Sep 18, 2009 - 2:45 PM

The SiwModifyStyle() method is always invoked at the beginning of the grid control initialization and it always contains focus/selection/scrolling settings. Please search for this method invocation in the SimpleGrids sample application and you will find all the required styles you should use. The most often used scrolling strategies in grid controls are horizontal pixel-by-pixel scrolling and vertical item-by-item scrolling. These strategies are applied by the __ESIS_STH_PIXEL|__ESIS_STV_ITEM styles. The focus selection models are applied with the __EGBS_SF*** styles.

Itay Shahaf Sep 17, 2009 - 9:40 AM


Still doesn’t work...

I’m using a grid that inherits from CExtReportGridWndExt.

In the grid initialization I’m using:


and then in every column I’m using:

// Col 1 



        pRGC = _listColumns.GetNext( pos );

        pCell = ReportItemGetCell( pRGC, pRGI, RUNTIME_CLASS(CExtGridCellStringDM) );

        ASSERT_VALID( pCell );           

        strPropVal.Format("%f", m_vecData[nRow].m_fCol1);






Technical Support Sep 18, 2009 - 3:39 AM

The problem is not hidden in the CExtGridCellStringDM class. Did you override any virtual methods of the CExtGridWnd class?
The CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() method analyzes grid cell mouse clicks and invokes the CExtGridWnd::OnGbwBeginEdit() method for cell editing. You can set breakpoint into the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() method and try to analyze why the CExtGridWnd::OnGbwBeginEdit() method does not become invoked.

Technical Support Sep 16, 2009 - 11:08 AM

The __EGWS_BSE_EDIT_CELLS_INNER grid window style allows you to edit all inner data grid cells in the grid control. Other __EGWS_BSE_EDIT_*** styles are defined to enable cell in-place editor activation on different input events.

The __EGCS_NO_INPLACE_CONTROL grid cell disables editing a particular grid cell object.

Itay Shahaf Sep 17, 2009 - 12:32 PM

So, what’s wrong with my code?

Maybe it’s the fact that I can’t select a single cell (a click on the grid selects the whole row)?



Technical Support Sep 18, 2009 - 7:37 AM

How do you initialize your grid control? Which focus/selection model is applied in it?

Itay Shahaf Sep 18, 2009 - 1:21 PM

I’m not using any focus/selection model. Which model should I use?