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 » CExtGridWnd Collapse All
Subject Author Date
Roberto Manes Mar 4, 2008 - 7:51 AM

I would like to delete one row from the grid when I type the delete key. I know the way to remove one row, I know the way to capture the delete key by means the OnGbwAnalyzeCellKeyEvent(..) method, but I don’t know from the inside of such a method how to retrieve the current selected row.
I would appreciate if you could help me.

Technical Support Mar 5, 2008 - 3:52 AM

The selection model in CExtGridWnd uses an array of CRect objects with each rectangle describing a range of selected columns and rows. This model is used even in full row selection grids. There is a set of CExtGridBaseWnd::Selection***() methods that allow you to do everything with selection. Typically you should use the CExtGridBaseWnd::SelectionGetFirstRowInColumn()/CExtGridBaseWnd::SelectionGetNextRowInColumn() methods to traverse all selected rows in the grid window. If you are using a single row/cell selection model, you should use CExtGridBaseWnd::FocusGet() instead because focus and selection is the same in this case.