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 » Select a whole row in the grid? Collapse All
Subject Author Date
Bangjun Lei Oct 16, 2007 - 8:05 AM

Dear Sir./Madam.,

Can you teach me how to select a row in the grid using instructions but not mouse click?

Thanks!

Bangjun Lei Oct 16, 2007 - 8:06 AM

In the above situation I only know the row index.

Suhai Gyorgy Oct 16, 2007 - 8:35 AM

Support’s answer:
<<<<<<<<<<<<<<<<<
Just use the CExtGridBaseWnd::SelectionSet() method

CPoint ptSelection( 0, nRowNo );
SelectionSet( ptSelection );

In the full row mode, the column number will simply be ignored.
>>>>>>>>>>>>>>>>>
But personally I prefer FocusSet(CPoint(0, nRowNo)) as one of its default parameters indicates to set the selection along with the focus.
If you don’t use full row mode, you need to use SelectionSet(CRect(0, nRowNo, ColumnCountGet() - 1, nRowNo));