Capture Indent/Outdent and retrieve args to update SQL

How do i capture the event for indent/outdent and the args availble such as taskid and parentid? OnActionComplete is fired but args.data is null.

Thanks, Martin


3 Replies

MS Monisha Sivanthilingam Syncfusion Team October 19, 2021 10:20 AM UTC

Hi Martin, 
 
Greetings from Syncfusion support. 
 
We can achieve your requirement by making use of the GetSelectedRecordsAsync method in the OnToolbarClick event to get the details of the indented/outdented record. The following code snippets demonstrate the solution. 
 
Index.razor 
 
<GanttEvents OnToolbarClick="ToolbarClickHandler" TValue="TaskData"></GanttEvents> 
 
 
 
public void ToolbarClickHandler(ClickEventArgs args) 
{ 
  if (args.Item.Text == "Indent" || args.Item.Text == "Outdent") 
  { 
    var record = this.Gantt.GetSelectedRecordsAsync(); 
  } 
} 
 
 
We have also prepared a sample for your reference. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 



MA Martin October 19, 2021 02:00 PM UTC

Thank you very much



MS Monisha Sivanthilingam Syncfusion Team October 20, 2021 04:19 AM UTC

Hi Martin, 
 
You are welcome. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon