Populating a nested grid row & saving edits from this nested grid row.

Hello All,

I have a grid derived from GridControlBase. The grid displays objects as columns, the number of which isn't know until run time. The number of rows is fixed at 10, one of which is a nested grid cell which has 7 rows (6 check boxes and a drop down).


Populating the nested grid is proving difficult, as is getting any edits to the nested grid and saving them back to the objects.

If I specify the QueryCellInfo handler used by the outer grid for the nested grid cell, my application crashes inside the CommitCellInfo handler for the nested grid which is being called from the QueryCellInfo handler when values are assigned to the first nested grid cell row.

If specify that the nested grid cell use it's own handler, only the first column nested grid gets populated because I need the outer grid column index to know which object to populate the nested grid cells.

How do populate the nested grid cell with the properties of their related objects on startup?

How do I populate the nested grid cell of newly added columns (via the button at the top)?

How do save edits made to the nested grid cell back to the object?


thanks.


Attachment: REPORT_ITEM_GRID_5b5bbfd1.zip

1 Reply

BT Balamurugan Thirumalaikumar Syncfusion Team August 19, 2021 01:45 PM UTC

Hi Zeljko, 

Thank you for the update. 

We have checked your query “How do save edits made to the nested grid cell back to the object?” at our end. We analysed the sample provided, which includes a gridcontrol with nested grid cell type. The commitcellinfo event is handled in the provided sample using the e.handled property. If the handled property is true, the commitcellinfo event does not save the edit back to the cell. To avoid this scenario, we recommend disabling the handled property and relying on commitcellinfo to save the cell edits. In the sample, we can save cell edits and have the edited cell values properly updated in the reportitems collection. You can refer the following video and sample for your reference. 
 


How do populate the nested grid cell with the properties of their related objects on startup? 

How do I populate the nested grid cell of newly added columns (via the button at the top)? 
To populate the nested grid data’s we suggest to refer the following documentation for your reference. 


If we misunderstood your query please let us know if you would require any other assistance. we will be always happy to assist you. 

Thanks & Regards, 
Balamurugan Thirumalaikumar

Loader.
Up arrow icon