Attached my code.
Its working fine as expected.
But while i am exporting to excel, the child rows are not showing. because in datasource field i made "Comments" field as hidden. If i remove "hidden" then data is exporting as expected. But i dont want to show this Comments field as parent record.
I tried to use showColumn/hideColumn as mentioned in code. but its not working as expected. Looking your help on this.
9 Answers, 1 is accepted
Hi Kirubakaran,
Find below a modified Dojo sample that exports the hidden column "Comments". After the export, the column is hidden once again.
https://dojo.telerik.com/aPaGOKaz
The slight blink of the grid is expected behavior since the column actually gets shown and hidden afterward. You might opt for adding an overlay that would hide the blink of interest.
Let me know in case further assistance is needed.
Regards,
Tsvetomir
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Tsvetomir,
I tested the Dojo sample. But child records not exporting. Looking forward your help
Hi Kirubakaran,
Find the updated Dojo sample that implements the logic for the inner rows export. I have added your code snippet inside the logic for showing the column:
https://dojo.telerik.com/AXAgIkEd
Give this a test and let me know how it works out for you.
Regards,
Tsvetomir
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Tsvetomir,
While i am clicking export button, still i didnt get the child records. The excel sheet contains only the parent rows with comments (which i expected).
But child rows not getting in excel. Expecting your help
Hi Kirubakaran,
Indeed, the export of the hierarchy is not available out-of-the-box. This is due to the fact that the main grid cannot be responsible for triggering the export event for the child records. Even if that was possible, all of the grids would have been exported to different files.
In order to export a grid with its child grids, incorporate the example that has been demonstrated in the following forum thread:
https://www.telerik.com/forums/excel-export-of-multiple-detail-levels
Let me know in case assistance in the incorporation is needed.
Regards,
Tsvetomir
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Tsvetomir,
I already gone through it and i cannot modify my code as per that detailed export. Thats why i am here to get help.
Anyways, i will put more effort and try to implement this.
Thanks
Hi Kirubakaran,
The approach that has been provided in the forum thread is the only one that could be undertaken. This is due to the fact that the two master and child grids are decoupled and do no know about each other. Also, in order to concatenate the two into only one Excel file, the outputs of the inner grids should be dynamically appended to the Workbook of the parent grid.
The provided Dojo sample exposes JavaScript logic that is rather generic and it is highly likely that further modifications will not be needed. I believe that you could use it as-is in your project.
Feel free to get back to me in case additional information is needed.
Regards,
Tsvetomir
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Tsvetomir,
Thanks & as per your help, i re-use that code & tried to implement my export functionality. But here i am getting only the header as my child entry. Looking forward your help on this.
Thanks
Hi Kirubakaran,
Thank you for the provided sample project. I have investigated it and I have noticed that the data source for the Kendo Exporter has not been actually set to the "Comments" of the parent row. Check out the modified version here:
https://dojo.telerik.com/EnUkOgOY
Regards,
Tsvetomir
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.