GridControl::SelCell

 

Contents

Description

Selects a cell.

Syntax

void SelCell( int nRow, int nCol, bool bSelLast = false )

Parameters

nRow
[input] row index, -1 to hide selection
nCol
[input] column index, -1 to hide selection
bSelLast
[input] if true, ignore nRow or nCol and select last cell

Return

Examples

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

 int nRow, nCol;
        double result;
        double d_str;
        string temp;
        m_GridCtrl.SelCell(4,0,false);
        m_GridCtrl.SetCell(4,0,10086);
        m_GridCtrl.GetSelCell(&nRow, &nCol);
        out_int("col=",nCol);
        out_int("row=",nRow);
        temp=m_GridCtrl.GetCell(flexcpText,nRow, nCol);
        if(is_numeric(temp,true,true,false))
        {
        d_str=atof(temp);
        m_GridCtrl.SetCellData(nRow, nCol,d_str);
        result=m_GridCtrl.GetCellDoubleData(nRow, nCol);
        out_double("The double data in chosen cell is ",result);
        }
        else
        {
                out_str("Please enter a double");
        }

Remark

See Also

header to Included

GridControl.h