ClearData

<< Click to Display Table of Contents >>

Manual > Control Reference > Basics > Grid control > Methods >

ClearData


 

Clear the data in the cell.

 


Syntax 1

ClearData(

         areaType

         [,bOnlyEditCell = T]

         )

 

Clears the data in the cells in the specified area.

 


Parameters

 

areaType


Type:

character


"all" - All cells.

"select" - The currently selected range of cells.

"cursor" - The cell where the cursor is currently located. If only one cell is selected, this is the same as "select".

 

bOnlyEditCell


Type:

Boolean


TRUE- Only the contents of cells of type "edit" are included

FALSE - for all cell types

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 

 


Syntax 2

ClearData (

         "cell",

         col,

         row

         [,bOnlyEditCell = T]

         )

 

Clears the data in the specified cell.

 


Parameters

 

areaType


Type:

character


"cell"

 

col


Type:

Number


Columnindex (column number starting from 0).

 

row


Type:

Number


index of the row (row number starting from 0).

 

bOnlyEditCell


Type:

Boolean


TRUE- Only the contents of cells of type "edit" are included

FALSE - for all cell types

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 

 


Syntax 3

ClearData (

         "row",

         row

         [,bOnlyEditCell = T]

         )

 

Clears the data in the specified row.

 


Parameters

 

areaType


Type:

character


"row"

 

row


Type:

Number


The row index (0-based).

 

bOnlyEditCell


Type:

Boolean


TRUE- Only the contents of cells of type "edit" are included

FALSE - for all cell types

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 

 


Syntax 4

ClearData (

         "col",

         col

         [,bOnlyEditCell = T]

         )

 

Clears the data in the specified column.

 


Parameters

 

areaType


Type:

character


"col"

 

col


Type:

Number


The column index (0-based).

 

bOnlyEditCell


Type:

Boolean


TRUE- Only the contents of cells of type "edit" are included

FALSE - for all cell types

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 

 


Syntax 5

ClearData (

         "range",

         col1,

         row1,

         col2,

         row2

         [,bOnlyEditCell = T]

         )

 

Clears the data in the cells in the specified range.

 


Parameters

 

areaType


Type:

character


"range"

 

col1


Type:

character


The index of column 1 (0-based column number).

 

row1


Type:

Number


The index of row 1 (row numbering starts at 0).

 

col2


Type:

Number


The index of column 2 (0-based column number).

 

row2


Type:

Number


The index of row 2 (row numbering starts at 0).

 

bOnlyEditCell


Type:

Boolean


TRUE- Only the contents of cells of type "edit" are included

FALSE - for all cell types

 

Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 


hmtoggle_plus1Explanation

 


reference