TreeGrid

I built this treegrid:

ReportGrid = layout.cells(“a”).attachGrid();
ReportGrid.setImagePath("./codebase/imgs/");
ReportGrid.setHeader(“Livelli Piramide,SI,NO,NON SO”);
ReportGrid.setInitWidths(“300,,,*”,[“text-aling:center”,“text-align:center”,“text-align:center”,“text-align:center”]);
ReportGrid.setColAlign(“left,center,center,center”);
ReportGrid.setColTypes(“tree,ro,ro,ro”);
ReportGrid.setNumberFormat(“0.000,00”, 1,",",".");
ReportGrid.setNumberFormat(“0.000,00”, 2,",",".");
ReportGrid.setNumberFormat(“0.000,00”, 3,",",".");
ReportGrid.init();
ReportGrid.enableTreeImages(0);
ReportGrid.kidsXmlFile=“php/report.php”;
ReportGrid.load(“php/report.php”);

but there some strange behaviours:

  1. the setInitWidths gives result about dimension but the align sentences are completely ignored while in other examples they run correctly
  2. setNumberFormat are completely ignored. I try everything but no results.
  3. the enableTreeImages(0) seems to be interpreted as an error because if i cut this command the Tree is regularly load with his items and the script continues with the other commands. If i let this command the tree is not loaded and the script seem stop there.

Please help me i don’t understand these strange behaviours.

Thanks

  1. the setInitWidths gives result about dimension but the align sentences are completely ignored while in other examples they run correctly

Please, try to define the align in setHeader() method but not in setInitWidths():
docs.dhtmlx.com/doku.php?id=dhtm … initwidths
docs.dhtmlx.com/doku.php?id=dhtm … _setheader

  1. setNumberFormat are completely ignored. I try everything but no results.

Please, note that the setNumberFormat() method works for “edn”, “ron” excells only:
docs.dhtmlx.com/doku.php?id=dhtm … mberformat

  1. the enableTreeImages(0) seems to be interpreted as an error because if i cut this command the Tree is regularly load with his items and the script continues with the other commands. If i let this command the tree is not loaded and the script seem stop there.

enableTreeImages() method can be applied only to a dhtmlxTree but not dhtmlxTreeGrid.
Here you can find all available api methods specific to dhtmlxTreeGrid:
docs.dhtmlx.com/doku.php?id=dhtm … _toc_alpha

Many many thanks.

So if i don’t want icons in treegrid i 've to use setImageSize(1,1), with 0,0 doesn’t run. But there is a problem: the text of the Item is margined to top of row and so is not aligned with plus/minus signs.

How can i center to the row ?

Bye.

So if i don’t want icons in treegrid i 've to use setImageSize(1,1), with 0,0 doesn’t run.
exactly!

the text of the Item is margined to top of row and so is not aligned with plus/minus signs.
How can i center to the row ?
Unfortunately the issue cannot be reproduced locally.
Please, make sure that any css class applied to the parent containers is not changing the vertical-align.
you may try to use the following css to change the vertical-align in the grid rows:

div.gridbox_dhx_skyblue table.obj tr td{ vertical-align: middle }

Many thanks again but the problem remains.

I try to use your suggestion but nothing change. The Others experiments that i did, are:

  • to use anoteher skin (light) but nothing.
  • to use the grid.setColVAlign that i found in Api but nothing again. It seems to be a bug !

I ensure that i didn’t modify the css. Any Idea ??

Another important question.

I made a custom eXcell field for my grid where i need to get the coordinates of cell

i got the row_id in this way: var row_id=this.cell.parentNode.idd, but how can i obtain the column id (name) of the column in which there is the cell ? this.cell.???

Thanks again.

I try to use your suggestion but nothing change. The Others experiments that i did, are:

  • to use anoteher skin (light) but nothing.
  • to use the grid.setColVAlign that i found in Api but nothing again. It seems to be a bug !
    I ensure that i didn’t modify the css. Any Idea ??
    Unfortunately the issue cannot be reproduced locally. If it’s still occurs for you - please, provide with a complete demo, where the issue can be reconstructed.
    Here you can find a tutorial:
    docs.dhtmlx.com/doku.php?id=othe … leted_demo

i got the row_id in this way: var row_id=this.cell.parentNode.idd, but how can i obtain the
column id (name) of the column in which there is the cell ? this.cell.???

Please, try to use:

col_ind=this.cell.cellIndex