GridControl::CheckConvertCol

 

Description

Convert from actual grid index into 0 offset column index, option to expand as well.

Syntax

bool CheckConvertCol( int & nCol, bool bExpand )

Parameters

nCol
[input] actual grid index, the first non-fixed column's index is 0
bExpand
[input] if true it will add columns when there's not enough column

Return

false if nCol is invalid or there's not enough column, otherwise true

Examples

Example codes can be pasted to doExample() function in GridControl's examples to run

         int nCols = m_GridCtrl.GetNumCols();
                int nCol = nCols+1;
                bool bRet = m_GridCtrl.CheckConvertCol(nCol, true);//bExpand=true to add enough columns
                out_int("bRet=", (int)bRet);
                out_int("nCol=", nCol);

Remark

See Also

GridControl::GetNumCols
GridControl::GetColOffset
GridControl::CheckConvertRow

Header to Included

GridControl.h