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

GanttResource Object

The following table lists the most important methods of the GanttResource client-side object:

NameParametersReturn TypeDescription
get_idnonestringGets the id of the resource. See Example 1.
get_textnonestringGets the text of the resource. See Example 2.
get_colornonestringGets the color of the resource. See Example 3.
get_formatnonestringGets the format of the resource value. See Example 4.

 Example 1: Get the id of the first resource in the Gantt's DependencyCollection.

JavaScript
var gantt = $find("<%= RadGantt1.ClientID %>");
var firstResource = gantt.get_resources().getResource(0); 	
var id = firstResource.get_id();	 

 Example 2: Get the text of the first resource in the Gantt's DependencyCollection.

JavaScript
var gantt = $find("<%= RadGantt1.ClientID %>");
var firstResource = gantt.get_resources().getResource(0); 
var text = firstResource.get_text();	 

 Example 3: Get the color of the first resource in the Gantt's DependencyCollection.

JavaScript
var gantt = $find("<%= RadGantt1.ClientID %>");
var firstResource = gantt.get_resources().getResource(0); 
var color = firstResource.get_color();	 

 Example 4: Get the format of the first resource in the Gantt's DependencyCollection.

JavaScript
var gantt = $find("<%= RadGantt1.ClientID %>");
var firstResource = gantt.get_resources().getResource(0); 
var format = firstResource.get_format();	 

See Also

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