Gridx Tree find nested level

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Gridx Tree find nested level


I am trying to get a button to only appear on the root level and the first nested level and not to appear on any further nested levels.

I cant seem to find anything that refers to the nested level in the cellWidget object when declaring the column with:

{ field: 'id', width: "10%", widgetsInCell: true,
decorator: function() {
return "<button data-dojo-type='dijit/form/Button' data-dojo-attach-point='btn'></button>";
setCellValue: function(gridData, storeData, cellWidget) {
// if nested level is > 2, do this:
// else do this
cellWidget.btn.set('label', 'Delete Row');
getCellWidgetConnects: function(cellWidget, cell) {
return [
[cellWidget.btn, 'onClick', function(e) {
//Do something

Is there something in the CellWidget object that I can use to get the nested level?

Thank you very much in advance,