New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

GanttResource Object

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

Name Parameters Return Type Description
get_id none string Gets the id of the resource. See Example 1.
get_text none string Gets the text of the resource. See Example 2.
get_color none string Gets the color of the resource. See Example 3.
get_format none string Gets the format of the resource value. See Example 4.

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

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.

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.

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.

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

See Also

In this article