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 window refreshment Collapse All
Subject Author Date
Nader Mimouni Mar 27, 2007 - 4:46 AM


In my program, I’m using a grid window that contain different controles such as checkbox,comboboxes and so on. Normally, when changes are made in one cell, some other changes in the other cells should be visible once completing the input. But those changes can’t be visible only if mouse is moved or the row selection changed. I need your help on this.

Many thanks in advance !

Technical Support Mar 27, 2007 - 8:14 AM

There is a CExtGridWnd::GridCellRectsGet() method that allows you to get the location of a grid cell and the location of any of its parts. The location is specified in pixels relative to the grid window’s client area. CExtGridWnd::GridCellRectsGet() returns false if the grid cell is outside the visible range of cells. In this case, it is not possible to compute the cell location and you should always analyze the returned boolean value. Here is how you could use this method.

CRect rcCell;    
if( m_wndGrid.GridCellRectsGet( nColNo, nRowNo, 0, 0, rcCell ) )
            m_wndGrid.InvalidateRect( &rcCell );
You can also use the m_wndGrid.OnSwDoRedraw() method to redraw the whole grid window.