Objective Grid: Moving the current cell to the first editable column in the selected row

Article ID: 372
Last updated: 27 Apr, 2018
Article ID: 372
Last updated: 27 Apr, 2018
Revision: 3
Views: 2105
Posted: 24 Jan, 2001
by Meltreger B.
Updated: 27 Apr, 2018
by Meltreger B.

Problem

 


With CGXODBCGrid, when the user selects a row, I would like to move the current cell to the first editable column in that selected row. How can I do that?

 

 


Cause

 


 

 


Action

 


You should override SetCurrentCell() as follows:
 

BOOL CGxqueryView::SetCurrentCell(ROWCOL nRow, ROWCOL nCol, UINT flags /* = GX_UPDATENOW */)
{
if (nCol <= GetHeaderCols())
{
nCol = min(GetHeaderCols()+1, GetColCount());
}

return CGXGridCore::SetCurrentCell(nRow, nCol, flags);

}


 

This article was:   Helpful | Not helpful
Report an issue
Article ID: 372
Last updated: 27 Apr, 2018
Revision: 3
Views: 2105
Posted: 24 Jan, 2001 by Meltreger B.
Updated: 27 Apr, 2018 by Meltreger B.

Others in this category