SetCellStyle

<< Click to Display Table of Contents >>

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

SetCellStyle


 

Change cell styles by row or column.

 


Syntax 1

SetCellStyle(

         "row",

         styleNames

         [,row]

         )

 


Parameters

 

areaType


Type:

character


"row"

 

styleNames


Type:

Character Array


A one-dimensional array of style names. The number of columns is specified in the array. Multiple styles can be set by separating the style names with commas.

 

row


Type:

Number


Row index (arrayable by row number starting from 0), or all rows if omitted.

 

Return Value

none

 


hmtoggle_plus1Explanation

 


Syntax 2

SetCellStyle(

         "col",

         styleNames

         [,col]

         )

 


Parameters

 

areaType


Type:

character


"col"

 

styleNames


Type:

Character Array


A one-dimensional array of style names. The number of rows is specified in the array. Multiple styles can be set by separating the style names with commas.

 

col


Type:

Number


Column index (0-based column number, orderable), or all columns if omitted.

 

Return Value

none

 


hmtoggle_plus1Explanation

 

 

hint

If you want to modify all cells or each cell, set the style property with SetCellProperty.

 

Example: Change the style of all cells

this.SetCellProperty("all", "style", "styleLabel");

 

Example) Change the style of the currently selected cell

this.SetCellProperty("cell", "style", "styleLabel", this.GetSelectedCol(), this.GetSelectedRow());

 

 


reference

 

AddStyle