GroupOptions class (Schedule)

GroupOptions()

new GroupOptions()

The GroupOptions type contains all the options that a Group object can display or own. The control can display events in groups, with each group having its own header represented as a column that shows all events belonging to that group. The first parameter of the Groups.Add method and the Group.Options property use the GroupOptions type to define the options for adding or updating a group. The showGroupingEvents and headerGroupHeight fieldsdefine the visibility and the height of the group headers

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
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

The control displays groups if:

  • ShowGroupingEvents property is true
  • at least a visible group is defined into the control (at least a group is added into the control's groups collection)

Members

(static) caption :any

The caption field defines the ex-HTML caption of the group (the group's header displays its caption). If caption is not specified, the id field defines the caption of the group. If both caption and id fields are not specified, the index of the group defines the caption of the group. The id field specifies the group's unique identifier. The title field defines 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). The MiscellaneousOptions.formatGroupCaption field specifies the format and alignment to display the group's caption.

The caption field is mapped to the Caption property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {caption: "group"}
oGroup.SetOptions({caption: "group"})
oGroup.Caption = "group"
oGroup.SetCaption("group")
Type:
  • any
Example
null {null}, resets the caption of the group
"caption" {string}, defines the plain-caption for the group
caption

(static) eventShape :any

The eventShape field defines the shape to apply on events of the same group. The "event" part of the shapes field defines the default shape to apply to events. Use the eventShape field to define a specific shape for events of a specific group, and so to highlight them from other groups. The eventShape field overrides the default shape defined for events, but does not override the shape defined for a specific event (using the Event.Shape property). The headerShape field defines the shape for the group's header. By default, the eventShape field is null, which means that no custom shape is applied on events of the same group (the default object's shape may be applied).

The eventShape field can be any of the following:

  • the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes 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

The eventShape field is mapped to the EventShape property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {eventShape: "red"}
oGroup.SetOptions({eventShape: "red"})
oGroup.EventShape = "red"
oGroup.SetEventShape("red")
Type:
  • any
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)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
eventShape

(static) headerShape :any

The headerShape field defines the shape for the group's header. The "date-grouping-header" part of the shapes field defines the default shape to apply to date-grouping header. Use the headerShape field to define a specific shape for the header of a specific group, and so to highlight it from other groups. The eventShape field defines the shape to apply on events of the same group. By default, the headerShape field is null, which means that no custom shape is applied on the group's header (the default object's shape may be applied).

The headerShape field can be any of the following:

  • the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes 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

The headerShape field is mapped to the HeaderShape property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {headerShape: "red"}
oGroup.SetOptions({headerShape: "red"})
oGroup.HeaderShape = "red"
oGroup.SetHeaderShape("red")
Type:
  • any
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)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
headerShape

(static) id :any

The id field specifies the group's unique identifier. The Schedule.Group() method gets a specific group giving its identifier. The Event.GroupID property indicates the identifier of the group that event belongs to. The caption field defines the ex-HTML caption of the group (the group's header displays its caption). If id is not specified, the caption field defines the identifier of the group. If both id and caption fields are not specified, the index of the group defines the identifier of the group. The id field is optional when groups are defined using the groups field (as object), since the field name serves as the group's identifier.

For instance, the options:

groups: {G1: {caption: "group1"}, G2: {caption: "group2"}}

defines two groups with "G1" and "G2" identifiers, and "group1" and "group2" captions, where the id field is not required.

The id field is mapped to the GetID/SetID methods of the Group object, which means that the following statements are equivalent:

oGroup.Options = {id: "G1"}
oGroup.SetOptions({id: "G1"})
oGroup.ID = "G1"
oGroup.SetID("G1")
Type:
  • any
Example
null {null}, the null value has no effect
"G1" {number}, defines the group with the identifier (G1). You can use the oSchedule.Group("G1") method to request the group giving its identifier.
id

(static) position :number

The position field specifies the group's position. The "group-drag" action of the allowActions field defines whether the user can change the position of groups by dragging and dropping them. By changing the position of a group, the user can change the order of groups among other groups. The position of a group indicates the order of the group among other groups. The group with the smallest position is shown on the first position (the leftmost column), and the group with the biggest position is shown on the last position (the rightmost column). By default, the position field is null, which means that groups are ordered by their addition-order into the control (the first added group is shown on the first position, and so on).

The position field is mapped to the Position property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {position: 1}
oGroup.SetOptions({position: 1})
oGroup.Position = 1
oGroup.SetPosition(1)
Type:
  • number
Example
null {null}, the null value has no effect
0 {number}, moves the group on the first position
position

(static) title :any

The title field defines the ex-HTML 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). The Group.Visible property indicates whether the group is visible or hidden. The id field specifies the group's unique identifier. The caption field defines the ex-HTML caption of the group (the group's header displays its caption). If the title field is not specified, the caption field defines the title of the group. If both title and caption fields are not specified, the id field defines the title of the group, and lastly the index of the group defines the title of the group.

The title field is mapped to the Title property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {title: "group"}
oGroup.SetOptions({title: "group"})
oGroup.Title = "group"
oGroup.SetTitle("group")
Type:
  • any
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
title

(static) visible :boolean

The visible field indicates whether the group is visible or hidden. The control displays groups if showGroupingEvents field is true, and at least a visible group is defined into the control (at least a group is added into the control's groups collection). The user can toggle the visibility of groups using the drop down grouping button. When a group is hidden, its header is not displayed, and events belonging to that group are not displayed in the control. When a group is visible, its header is displayed, and events belonging to that group are displayed in the control. By default, the visible field is true, which means that the group is visible.

The visible field is mapped to the Visible property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {visible: true}
oGroup.SetOptions({visible: true})
oGroup.Visible = true
oGroup.SetVisible(true)
Type:
  • boolean
Example
false {boolean}, hides the group
true {boolean}, shows the group
visible

(static) width :number

The width field specifies the group's width. The width of a group indicates the width of the column that shows events belonging to that group. The "group-resize" action of the allowActions field defines whether the user can resize the width of groups. By default, the width field is null, which means that all groups with width on null are shown equaly (the control calculates the width for each group with width on null, by dividing the available-width for groups by the number of groups with width on null).

The width field is mapped to the Width property of the Group object, which means that the following statements are equivalent:

oGroup.Options = {width: 128}
oGroup.SetOptions({width: 128})
oGroup.Width = 128
oGroup.SetWidth(128)
Type:
  • number
Example
-1 {number} or null {null}, all groups with width on null are shown equaly
128 {number}, defines the width of 128px
width