new Groups(oSchedule)
The Groups object holds a collection of Group type (group of the control). Use the Groups/GetGroups() method to access the control's groups collection.
Parameters:
Name | Type | Description |
---|---|---|
oSchedule |
Schedule | Indicates an object of Schedule type that owns the collection |
Methods
Add(oGroupOptsopt) → {Group}
The Add() method creates and adds a new group into the control.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
oGroupOpts |
any |
<optional> |
Specifies the options to create the new group, as an object of GroupOptions type, else it defines the identifier of the group (the group's header displays its caption) |
Returns:
Returns the newly created group, as an object of Group type
- Type
- Group
Example
oSchedule.Group.Add("G1"), adds a new group with the identifier "G1"
oSchedule.Group.Add({caption: "G1"}), adds a new group named "G1"
Add
Clear()
The Clear() method removes all groups of the control and inits the control's scroll-bars
GetCount() → {number}
The GetCount() method returns the number of groups within the collection
Returns:
Returns the number of groups within the collection
- Type
- number
Example
The following statements are equivalents:
oSchedule.Group.GetCount(), counts the groups within the control
oSchedule.Group.Count, counts the groups within the control
where oSchedule is an object of Schedule type
GetCount
Item(id) → {null|Group}
The Item() method gets the group giving its index, identifier or reference. The Group(id) method returns the group based on its index or identifier (equivalent of this method)
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
Returns:
Returns null if the group is not found, or an object of Group type, if the groups collection contains the giving id.
- Type
- null | Group
Remove(id)
The Remove() method removes a group from the collection.
Parameters:
Name | Type | Description |
---|---|---|
id |
any | The id parameter could be any of the following:
|
RemoveRange(range) → {number}
The RemoveRange() method removes multiple-groups at once
Parameters:
Name | Type | Description |
---|---|---|
range |
any | Indicates a group, an array [{Group}], or an exontrol.Arr([{Group}]) |
Returns:
Returns the number of groups being deleted
- Type
- number
cID() → {string}
The cID/createID() method gets the identifier of the owner-group once the user creates a new event by drag and drop. The cID() method is called only if the control displays All events not grouped. You can override the cID() method to specify the event's group when it is created by drag and drop. By default, the cID() method returns the identifier of the first group.
Returns:
Returns the identifier of the group.
- Type
- string
Example
oSchedule.Groups.cID = function()
{
return "G2"
}
indicates that any new event to create by drag and drop will be owned by "G2" group (the group with the ID on "G2")
cID