Hi support,
I'm using the TreeGrid Element to edit my data.
I want to reduce the columns in the grid, but still want to edit them.
So I'm using editSettings mode: Dialog which is working.
But I can't display the additional fields in the dialog.
With normal grids the code works perfectly, but not with treegrid.
Here is my code:
What can I do?
Regards,
Stephan
Hi Stephen,
Greetings from Syncfusion support.
We can replicate the issue from our end using the code snippet you have provided. We suggest you to use the columns from grid instead of treegrid Instance to show or hide the columns on dialog editing. Please refer to the following code snippet.
|
actionBegin: (args) => { if (args.requestType === 'beginEdit' || args.requestType === 'add') { for (var i = 0; i < treeGridObj.grid.columns.length; i++) { if (treeGridObj.grid.columns[i].field == 'Progress') { treeGridObj.grid.columns[i].visible = true; } } } if (args.requestType === 'save' || args.requestType === 'cancel') { for (var i = 0; i < treeGridObj.columns.length; i++) { if (treeGridObj.grid.columns[i].field == 'Progress') { treeGridObj.grid.columns[i].visible = false; } } } },
|
Sample : https://stackblitz.com/edit/ejumru-zd6cdg?file=index.js
Please get back to us if you need further assistance.
Regards,
Shek
Hi support,
this works now very well.
Many thanks.
Perhaps you can add this to the "How to" - Section of the TreeGrid documentation.
Regards,
Stephan
Hi Steplen,
Thanks for your valuable feedback. We have taken into consideration, and we will include the documentation for future reference.
Thanks and regards,
Shek