Group class (Schedule)

Group(oGroups)

new Group(oGroups)

The Group object holds the group of the control. The Group(id) method returns the group based on its index or identifier.

Every option of the GroupOptions type has associated a property of the Group object. For instance, the option:

caption {string}, defines the caption of the group (the group's header displays its caption)
is associated with the property:
Caption {string}, defines the caption of the group (the group's header displays its caption)
which means that the following statements are equivalent:
oGroup.Options = {caption: "group"}
oGroup.SetOptions({caption: "group"})
oGroup.Caption = "group"
oGroup.SetCaption("group")
where oGroup is an object of Group type
Parameters:
Name Type Description
oGroups Group Indicates an object of Groups type that's the owner collection of this group
Group

Members

GetId

The GetID() method gets the group's identifier.
GetId

GetId

The GetId() method gets the group's identifier.
GetId

SetId

The SetId() method assigns a new identifier to the group (equivalend of SetID).
Example
"logo" {string}, defines the group with the giving identifier (logo). You can use the oSchedule.Group("logo") method to request the group giving its identifier.
SetId

Methods

GetCaption() → {string}

The GetCaption() method gets the caption of the group (the group's header displays its caption).
Returns:
Returns the group's caption
Type
string
GetCaption

GetEventShape() → {any}

The GetEventShape() method defines the shape to apply on event of the same group.
Returns:
Returns the shape to apply on event of the same group, as one of the following:
  • null, no custom-shape is applied on the object (default-shape may be applied instead)
  • the shape's name within the exontrol.Shape.Schedule or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the group itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Type
any
GetEventShape

GetHeaderShape() → {any}

The GetHeaderShape() method defines the shape for the group's header.
Returns:
Returns the shape for the group's header, as one of the following:
  • null, no custom-shape is applied on the object (default-shape may be applied instead)
  • the shape's name within the exontrol.Shape.Schedule or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the group itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Type
any
GetHeaderShape

GetIndex() → {any}

The GetIndex() method retrieves the group's index.
Returns:
Returns the group's index (0-based)
Type
any
Example
The following statements are equivalents:

 oGroup.GetIndex(), retrieves the group's index
 oGroup.Index, retrieves the group's index

where oGroup is an object of Group type
GetIndex

GetOptions() → {object}

The GetOptions() method returns the group's options at once
Returns:
Returns an object of GroupOptions type
Type
object
Example
The following statements are equivalents:

 oGroup.GetOptions(), returns the group's options
 oGroup.Options, returns the group's options

where oGroup is an object of Group type
GetOptions

GetPosition() → {number}

The GetPosition() method retrieves the group's position.
Returns:
Returns the group's position
Type
number
GetPosition

GetTitle() → {string}

The GetTitle() method gets the title of the group (the group's title defines the caption of the group within the groups list, visible once the user clicks the drop down grouping button).
Returns:
Returns the group's title
Type
string
GetTitle

GetVisible() → {boolean}

The GetVisible() method determines whether the group is visible or hidden (By default, the Visible property is False)
Returns:
Returns true if the group is visible, or false if the group is not visible
Type
boolean
GetVisible

GetWidth() → {number}

The GetWidth() method retrieves the group's width.
Returns:
Returns the group's width
Type
number
GetWidth

Remove()

The Remove() method removes the group itself from the groups collection
Remove

SetCaption(value)

The SetCaption() method sets the caption of the group (the group's header displays its caption).
Parameters:
Name Type Description
value string A string expression that defines the caption of the group.
Example
null {null}, resets the caption of the group
 "caption" {string}, defines the plain-caption for the group
SetCaption

SetEventShape(value)

The SetEventShape() method changes the shape to apply on event of the same group.
Parameters:
Name Type Description
value any The value could be any of the following:
  • null, no custom-shape is applied on the object (default-shape may be applied instead)
  • the shape's name within the exontrol.Shape.Schedule or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the group itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Example
null {null}, no custom shape is applied (default object's shape may be applied)
 "" {string}, no custom shape is applied (no default object's shape is be applied)
 "red" {string}, fills the object's background in red (CSS color)
 '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
 "xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace
SetEventShape

SetHeaderShape(value)

The SetHeaderShape() method changes the shape for the group's header.
Parameters:
Name Type Description
value any The value could be any of the following:
  • null, no custom-shape is applied on the object (default-shape may be applied instead)
  • the shape's name within the exontrol.Shape.Schedule or exontrol.Shape namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the group itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Example
null {null}, no custom shape is applied (default object's shape may be applied)
 "" {string}, no custom shape is applied (no default object's shape is be applied)
 "red" {string}, fills the object's background in red (CSS color)
 '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
 "xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace
SetHeaderShape

SetID(value)

The SetID() method assigns a new identifier to the group
Parameters:
Name Type Description
value string Specifies a new identifier to be assigned to the group
Example
"logo" {string}, defines the group with the giving identifier (logo). You can use the oSchedule.Group("logo") method to request the group giving its identifier.
SetID

SetOptions(oOptions)

The SetOptions() method changes the group's options (visibility, caption, ...) at once
Parameters:
Name Type Description
oOptions object Specifies an object of GroupOptions type that holds information about the group, such as caption, image and so on. If the oOptions parameter is not-of object type it indicates the caption of the group instead
Example
oSchedule.Group(0).Options = {headerShape: "red", caption: "group"}, changes the group's caption and background
 oSchedule.Group(0).SetOptions({headerShape: "red", caption: "group"}), changes the group's caption and background
SetOptions

SetPosition(value)

The SetPosition() method changes the group's position.
Parameters:
Name Type Description
value number Specifies the group's new position
Example
null {null}, the null value has no effect
 0 {number}, moves the group on the first position
SetPosition

SetTitle(value)

The SetTitle() method sets the title of the group (the group's title defines the caption of the group within the groups list, visible once the user clicks the drop down grouping button).
Parameters:
Name Type Description
value string A string expression that defines the title of the group.
Example
null {null}, indicates that that group's caption is also the group's title
 "" {string}, shows no title for the group
 "title" {string}, defines the plain-title for the group
SetTitle

SetVisible(value)

The SetVisible() method shows or hides the group. The control displays groups if:
  • ShowGroupingEvents property is True
  • The Groups collection has visible elements. By default, the Groups collection contains no Group objects (Visible on True)
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the group is visible or hidden
Example
false {boolean}, hides the group
 true {boolean}, shows the group
SetVisible

SetWidth(value)

The SetWidth() method changes the group's width.
Parameters:
Name Type Description
value number Specifies the group's new width
Example
-1 {number} or null {null}, all groups with width on null are shown equaly
 128 {number}, defines the width of 128px
SetWidth