RadiantQ jQuery Gantt Package
How to get hold of bound activity in row click?
Previous Topic  Next Topic 

This topic shows how to get the bound activity in row click event. 


Here is the code :

var activityView = null;

var activityName = null;

//GanttChart table( which holds the Chart rows ).

var $ganttChartTable = ganttControl.GetGanttChart().find("table.chartRowsContainer");


//Click event of the chart.

$ganttChartTable.click(function (sender) {

    var $target = $(sender.target);

    var $tr = $target.closest("tr");

    //To get bound data from row.

    var activityView = ganttControl.options.GanttTable.data("VWGrid").GetDataFromRow($tr);

    activityName = activityView.Activity.ActivityName;

    alert(activityName);   

});


var $ganttTable = ganttControl.GetGanttTable().uiGridBody;


//Double click event of the table.

$ganttTable.click(function (sender) {

    var $target = $(sender.target);

    var $tr = $target.closest("tr");

    //To get bound data from row.

    var activityView = ganttControl.options.GanttTable.data("VWGrid").GetDataFromRow($tr);

    activityName = activityView.Activity.ActivityName;

    alert(activityName);   

});

   







� RadiantQ 2022. All Rights Reserved.