2.2.6.17.4 GridControl::CheckConvertRow


Description

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

Syntax

bool CheckConvertRow( int & nRow, bool bExpand )

Parameters

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

Return

false if nRow is invalid or there's not enough row, otherwise true

Examples

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

	int nRows = m_GridCtrl.GetNumRows();
	int nRow = nRows+1;
	out_int("nRows=", nRows);
	out_int("nRow=", nRow);
	bool bRet = m_GridCtrl.CheckConvertRow(nRow, true);//bExpand=true to add enough Rows
	out_int("bRet=", (int)bRet);//print 1 if nRow>0
	out_int("nRows=", m_GridCtrl.GetNumRows());//nRows will be set to nRow+1

Remark

See Also

GridControl::CheckConvertCol

Header to Included

GridControl.h