I have a radGantt utilizing a custom C# provider. If i select a task in the gantt chart on the left and hit the delete key the code triggers the following server side event..
protected void radGanttPlanning_OnTaskDelete(object sender, TaskEventArgs e)
{
In this section of code in the code behind how would i obtain the currently selected taskId of the task I need to delete?
Here is the custom provider's getTask method just to show you the structure of the CustomTask should you need it.
public override List<ITask> GetTasks()
{
if (taskList == null)
{
List<CurrencyRates> lsCurrencyRates = CurrencyRate.GetEffectiveCurrencyRates();
var tasks = (from DataRow drDataRow in dtResultTable.Rows
select new CustomTask
{
DatabaseID = int.Parse(drDataRow["id"].ToString()),
ID = drDataRow["projecttaskid"].ToString(),
ParentID = (drDataRow["parentId"] == DBNull.Value) ? null : drDataRow["parentId"],
OrderID = int.Parse(drDataRow["OrderId"].ToString()),
Start = DateTime.Parse(drDataRow["startdate"].ToString()),
End = DateTime.Parse(drDataRow["enddate"].ToString()),
Summary = bool.Parse(drDataRow["issummarytask"].ToString()),
Title = drDataRow["taskname"].ToString(),
Active = bool.Parse(drDataRow["active"].ToString()),
PreferredStart = DateTime.Parse(drDataRow["preferredstartdate"].ToString()),
Expanded = bool.Parse(drDataRow["expandable"].ToString()),
PercentComplete = (Decimal.Parse(drDataRow["percentageComplete"].ToString())/100),
ProjectID = int.Parse(drDataRow["projectid"].ToString()),
GuidID = Guid.Parse(drDataRow["guidid"].ToString()),
PredecessorIndicies = drDataRow["predecessorIndicies"].ToString(),
SchedulingGranularity = int.Parse(drDataRow["schedulingGranularity"].ToString()),
IndentLevel = int.Parse(drDataRow["indentlevel"].ToString()),
//Effort = int.Parse(drDataRow["effort"].ToString()),
TotalActualHours = double.Parse(drDataRow["TotalActualHours"].ToString()),
IsVave = bool.Parse(drDataRow["projectisvave"].ToString()),
lsCurrencyRates = lsCurrencyRates
}).Cast<ITask>().ToList();
taskList = tasks;
}
return taskList;
}