BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
I am using ObservableCollection trying to achieve two-way databinding on a TreeGridControl.
3 issues I am facing.
Hi Dinesh Thamby Ambookkan,
Query1: Data change from UI is not updated to model without manually assigning the value from event args.
We are able to replicate the issue at our end. We would like to clarify that the data will be reflected in the datasource only when the changes are updated in TreeGrid. In your shared sample we could see that you are checking the changed data in observable collection inside cellsave event handler. The changed data will not be reflected in Datasource it will be maintained locally until we update it by clicking the update button.
Query2: Code behind change is not reflected in UI even after OnPropertyChangeEvent call.
We could see that you are trying to change the value of an observable collection inside Oncellsave event handler. If so we suggest you to use the UpdateCellAsync method. So that it will be reflected in TreeGrid.
Please refer the below code snippet,
public async Task CellSaveHandler(Syncfusion.Blazor.Grids.CellSaveArgs<BusinessObject> args) { .. if (args.Data.TaskRate != null) { if (args.Data.ParentId == null) //editing parent row... { //Here pass the index as first params, fieldname as second params and value as a third parms BusinessObjectGrid.UpdateCellAsync(0, "TaskRate", null);
|
Please refer to the below API documentation,
Query3: Single Click edit not working.
We are able to replicate the issue at our end. And this issue is fixed in our latest version(21.1.41). So please upgrade to our latest version of Syncfusion package to resolve the reported issue.