BiGridColumn
This class is used to describe columns for BiGrid and BiTree.
This class extends
BiObject
and therefore all methods and fields available for
BiObject
are also available for
BiGridColumn
.
Constructor
new
BiGridColumn
(
[
sName
]
)
Parameters
| Name | Type | Optional | Default | Descripton |
sName |
String |
![]() |
Untitled |
This is used for the text to to show on the header cell
for the column |
Properties
| Name | Type | get | set | Descripton |
align |
String |
![]() |
![]() |
The alignment of the content inside the column. |
columnIndex |
Number |
![]() |
The index of the column in the grid columns collection. This is not neccessarily the same as the display order. | |
grid |
|
![]() |
The grid that the column is used in. | |
header |
|
![]() |
This is the header represenging the column in the grid. | |
iconColumn |
Number |
![]() |
![]() |
Whether the current column is the icon column in the grid. |
indentColumn |
Number |
![]() |
![]() |
Whether the current column is the indent column in the grid. This is ignored when using the columns for a non tree. |
name |
String |
![]() |
![]() |
The name of the column. This is the same as the text shown on the header. |
orderIndex |
Number |
![]() |
The index of the column as it is currently being displayed. This
means that the left most column has an order index of 0. This is
not necessarily the same as the columnIndex when
the columns have been reordered. |
|
sortFunction |
Function |
![]() |
This returns the function used to compare two
grid rows. This means that this
should return a function that takes two arguments and returns a
number (just like the normal comparison function used when sorting
arrays in JavaScript). |
|
sortType |
String |
![]() |
![]() |
The type of the data in the column. This is used to decide how
to sort the data in the column. Built in support for the following
types:string
caseInsensitiveString
number
date - Uses the native JS Date typeTo get better control over the sorting create a subclass that overrides the sortFunction getter. |
tree |
|
![]() |
The grid that the column is used in. (Same as grid.) |
|
width |
Number |
![]() |
![]() |
The width of the column. |
visible |
Boolean |
![]() |
![]() |
Whether the column is visible or not. |
Methods
None.
Events
None.
Static Methods
| Name | Description |
caseInsensitiveStringCompare |
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive. |
dateCompare |
A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
lessThanCompare |
A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
numberCompare |
A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
stringCompare |
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
Static Fields
None.
Remarks
Static Method Details
caseInsensitiveStringCompare
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive.
Syntax
BiGridColumn . caseInsensitiveStringCompare ( s1,s2 )
Parameters
| Name | Type | Optional | Default | Descripton |
s1 |
String |
The first string | ||
s2 |
String |
The second string |
Return Type
Boolean
dateCompare
A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiGridColumn . dateCompare ( d1,d2 )
Parameters
| Name | Type | Optional | Default | Descripton |
d1 |
Date |
The first date | ||
d2 |
Date |
The second date |
Return Type
Boolean
lessThanCompare
A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiGridColumn . lessThanCompare ( v1,v2 )
Parameters
| Name | Type | Optional | Default | Descripton |
v1 |
Object |
The first value | ||
v2 |
Object |
The second value |
Return Type
Boolean
numberCompare
A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiGridColumn . numberCompare ( n1,n2 )
Parameters
| Name | Type | Optional | Default | Descripton |
n1 |
Number |
The first number | ||
n2 |
Number |
The second number |
Return Type
Boolean
stringCompare
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiGridColumn . stringCompare ( s1,s2 )
Parameters
| Name | Type | Optional | Default | Descripton |
s1 |
String |
The first string | ||
s2 |
String |
The second string |
Return Type
Boolean
