2.2.4.22.3 Grid::CanInsert

Description

Based on the current selection, it determines whether it is possible to insert rows or columns if entire rows or columns are selected.

Syntax

BOOL CanInsert( )

Parameters

Return

TRUE if entire rows or columns are selected else FALSE.

Examples

EX1

//before running please highlight one column or one row
void Grid_CanInsert_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if(wks)
    {
        Grid gg;
        gg.Attach(wks);
        if(gg && gg.CanInsert())
        {
            printf("Rows:%d\tColumns:%d\n", gg.Rows, gg.Cols);
            gg.Insert();
            printf("Rows:%d\tColumns:%d\n", gg.Rows, gg.Cols);                
        }                
    }
}

Remark

See Also

Grid::Insert

Header to Include

origin.h