New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

SchedulerResourceTypeCollection Object

The SchedulerResourceTypeCollection client-side object represents a list of ResourcesTypes defined in the Scheduler.

The tables below lists the most important methods of the SchedulerResourceTypeCollection client-side object.

 

NameParametersReturn TypeDescription
get_count()NoneIntGets the number of ResourcesType in the collection.
add()ResourceTypeNoneAdds the specified ResourceType to the collection.
clear()NoneNoneClears the collection of all ResourcesType in it.
forEach()functionResourceTypeCollectionGets the collection of all ResourcesType. See Example 1.
getResourceType()IntResourceTypeGets the ResourceType at the specified index in the collection.
getResourcesTypeByName()StringResourceTypeGets a list of all ResourcesTypes of the specified type.
insert()Int (index), ResourceTypeNoneInserts the specified ResourceType at the specified index in the collection.
remove()ResourceTypeNoneRemoves the specified ResourceType (if it exists) from the collection.
removeAt()IntNoneRemoves the ResourceType at the specified index from the collection.

Example 1: Display all resource types

JavaScript
	     
function clientFormCreated(scheduler, args) 
{
	var mode = args.get_mode();
	if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
		mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
		//Alerts all resource types on AdvancedInsert/Edit Form created.
		var a = new Telerik.Web.UI.ResourceType();
		a.set_name("New ResourceType");
		scheduler.get_resourceTypes().add(a);
		scheduler.get_resourceTypes().forEach(function (type) {
			alert(type.get_name());
		});
	}
}
				

See Also

In this article
See Also
Not finding the help you need?
Contact Support