Please start using our more robust New Forum, we have put this old forum in archive mode. Thanks.


Welcome Guest Search | Active Topics | Log In

Tag as favorite
Delete option using context menu
ssunder
#1 Posted : Tuesday, August 05, 2014 8:10:01 AM

Posts: 19

Hi Team
I have delete option from context menu using this

// Delete option in context menu
var tableMenuItems = [
{
keyName: "DeleteItem",
name: "Delete Task",
icon: "Delete Item",
callback: function (key, opt) {
DeleteTaskRow(gantt, key, opt);
}
}
]
tableContextMenu.AddNewItems(tableMenuItems);

function DeleteTaskRow(gantt) {
//debugger;
var activity = gantt.SelectedActivity;
if (activity) {
//debugger;
gantt.RemoveActivity(activity.ID);
RebindPropertychange();
}
else
alert("Please select an item in the table first.");
}

function RebindPropertychange() {
//debugger;
var activityViews = gantt.Model.AllActivities;
for (var i = 1; i <= activityViews.length; i++) {
var view = activityViews[i];
//var activity = ganttControl.ActivityViews[i].activity;
var activity = gantt.Model.AllActivities[i];
var task = activity.DataSource;
//To listen the task changes.
task.PropertyChanged.subscribe(ChangeNotifier);
}
}

Now on delete click I am removing selected activity from gantt, now When I am updating that gantt and fetching all activity and updating property change notifier it is giving an error of undefined that activity is delete but gantt is not updated.

Can you suggest how can i remove that activity and can update that gantt chart?
Raja - RadiantQ
#2 Posted : Wednesday, August 06, 2014 9:52:10 AM

Posts: 314

Please follow up here:
http://newforum.radiantq.com/index.php
Thanks & Regards,
Rajagopal.
Tag as favorite
Forum Jump  
Please Email support@radiantq.com for any issues

ugg boots outlet cheap ugg sale ugg boots clearance ugg boots sale ugg boots cheap ugg boots for women uggs for cheap ugg shops cheap ugg boots cheap uggs Official Ugg Outlet ugg Store Buy Cheap UGGs ugg boots uk ugg boots usa ugg Online uggs on sale ugg outlets cheap ugg boot Discount UGG Boots discount uggs