Hi Hamery
simon,
Thanks for
your patience.
Query: Is it possible to disable a single row on the treegrid
(prevent the selection) but still allowing the expand button action ?
We achieved your query by using the rowDeselecting event of
the treegrid. You can prevent the deselection
using rowDeselecting event of the treegrid with args.cancel as true.
Please
refer to the below code example,
|
let treegrid: TreeGrid = new TreeGrid({
dataSource: sampleData,
childMapping: 'subtasks',
….
rowDeselecting: function (args) {
if (
args.target.classList.contains('e-treegridexpand') ||
args.target.classList.contains('e-treegridcollapse')
) {
args.cancel = true;
}
},
|
Please refer to the below sample,
https://stackblitz.com/edit/rett8x?file=index.ts
Please refer to the below API documentation,
https://ej2.syncfusion.com/documentation/api/treegrid/#rowdeselecting
If the above
solution does not meet your requirements, kindly share the detailed explanation
of your requirement and share the video demo or screenshot of your requirement.
Kindly get back to us for further assistance.
Regards,
Pon selva