Hi Nicklas,
Thanks for contacting Syncfusion Forums.
QUERY: Tree Grid not refreshing after updating data source when using hierarchy data
We do not have support for two way binding for hierarchy data. We suggest you to use the "UpdateRow" method with index and data as parameters for changing the column values and "AddRecord" method with data and index(index where new data should be inserted) as parameters for adding new record to the Tree Grid in the button click event. This way you can update and refresh data source of Tree Grid.
Please refer the below help documentations,
Please check the below code snippet,
|
in button click event
public void OnToggleClick(MouseEventArgs args)
{
-----------
var data = TreeData.Where(s => s.TaskId == 1).FirstOrDefault();
var value = data2;
data.TaskName = "Changed";
---
this.treeGrid.UpdateRow(0, data); // calling UpdateRow method , data is row's changed data
this.treeGrid.AddRecord(data2, 0); // calling Addrecord method ,value is new record to be added
}
|
Kindly get back to us for further assistance.
Regards,
Padmavathy Kamalanathan