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 Tech Support » CExtGridWnd bug ??? Collapse All
Subject Author Date
tera tera Oct 19, 2009 - 12:18 AM



Though a cell is not chosen

SelectionIsEmpty becomes true.

Is it a bug?

Is it specifications?

Technical Support Oct 19, 2009 - 8:28 AM

Here is the source code of the CExtGridBaseWnd::SelectionIsEmpty() method:

bool CExtGridBaseWnd::SelectionIsEmpty() const
	ASSERT_VALID( this );
	return ( SelectionGetAreaCount() == 0) ? true : false;

It simply returns the true flag if the selection region consists of zero rectangle count.
Your grid excludes intersected rectangles and uses full row selection model. You should use methods like CExtGridBaseWnd::SelectionGetFirstRowInColumn() / CExtGridBaseWnd::SelectionGetNextRowInColumn() to detect whether at least one row is selected.