Hi,
I have a requirement to create a Hierarchical grid in which I should be able to add new rows and the child grid should be added as well.When adding a new row I dont want the detailinit property to be run as many times as the number of rows is present. I only want to add asingle row to the existing grid and leave it intact.
I am implementing this in HTML. So please do give a solution for the HTML based one.
Thanks in advance
Regards,
Vijay
I have a requirement to create a Hierarchical grid in which I should be able to add new rows and the child grid should be added as well.When adding a new row I dont want the detailinit property to be run as many times as the number of rows is present. I only want to add asingle row to the existing grid and leave it intact.
I am implementing this in HTML. So please do give a solution for the HTML based one.
Thanks in advance
Regards,
Vijay
7 Answers, 1 is accepted
0
Hi Vijay,
The following example demonstrates editing in Grid with hierarchy.
Regards,
Alexander Valchev
Telerik
The following example demonstrates editing in Grid with hierarchy.
You will notice that when the user adds a record to the top Grid, all the previously expanded detail rows are collapsed. This behaviour is by design and I am afraid that it cannot be prevented. Adding a record in the child grid however, will not lead to collapsing of detail rows.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
AR
Top achievements
Rank 1
answered on 28 Jan 2014, 04:38 PM
If the nested grid is associated with same datasource then any changes to the child data also causes master grid to collapse. Is there a way to prevent this? This little missing function is preventing us from using the grid with hierarchical datasource as well. See updated sample
JSBin Sample
JSBin Sample
0
Hi,
The hierarchical dataSource cannot be used with a Grid. You sample actually does not use hierarchical dataSource component, but a standard DataSource with nested fields.
Such scenario is not supported out of the box and preventing the Grid rebinding is not recommended as it may cause various issues.
Please take a look at the hierarchy Grid demo page. Notice that each of the child Grids has its own dataSource which is the recommended approach for this scenario.
Regards,
Alexander Valchev
Telerik
The hierarchical dataSource cannot be used with a Grid. You sample actually does not use hierarchical dataSource component, but a standard DataSource with nested fields.
Such scenario is not supported out of the box and preventing the Grid rebinding is not recommended as it may cause various issues.
Please take a look at the hierarchy Grid demo page. Notice that each of the child Grids has its own dataSource which is the recommended approach for this scenario.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jianjing
Top achievements
Rank 1
answered on 24 Mar 2015, 10:01 PM
Hi support,
If I have on button on top add by myself. Do we have a sample code how to add sub grid row?
Thanks,
-JianJing
If I have on button on top add by myself. Do we have a sample code how to add sub grid row?
Thanks,
-JianJing
0
Hi Jianjing,
You may use the addRow method. Sample is included in the documentation:
Regards,
Alexander Valchev
Telerik
You may use the addRow method. Sample is included in the documentation:
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jianjing
Top achievements
Rank 1
answered on 26 Mar 2015, 09:19 PM
Hi Alexander Valchev,
I need add row on the sub grid which is detail grid.
addRow() will add row on top level so the example does not help.
Regards,
JianJing Qin
0
Hello Jianjing,
You should call the addRow method of the child grid to add a new row in the child grid.
Regards,
Alexander Valchev
Telerik
You should call the addRow method of the child grid to add a new row in the child grid.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!