Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stefan Riedel-Seifert on Feb 10, 2009 07:43
open dhtmlx forum
Treegrid attached to layout - resizing problem

Hello,

i am using layout 3T in fullscreen mode with attached treegrid to cell c. If i sort a column i will get a sorting indicator.
If i resize the whole window, the sorting indicator does not move with the corresponding column.

I can attach a picture, but not posting in creation mode.

Best regards,
Stefan Riedel-Seifert
Answer posted by Alex (support) on Feb 11, 2009 03:03

You can try to use onPanelResizeFinish event handler and correct the image position using treegrid (grid) API:

dhxLayout.attachEvent("onPanelResizeFinish",function(){

  var sort_state = dhxTreeGrid.getSortingState();

  if(sort_state.length){

  dhxTreeGrid.setSortImgState(true,sort_state[0],sort_state[1]);

  }
 })

Answer posted by Stefan Riedel-Seifert on Feb 11, 2009 03:59

Hi,

the event will be nor fired: i hav coded

 

  <script>
         var layout = new dhtmlXLayoutObject(document.body, "3T");
         layout.cells("a").hideHeader();
         layout.cells("b").hideHeader();
         layout.cells("c").hideHeader();
         layout.cells("a").setHeight(20);
         layout.cells("b").setWidth(175);

 layout.attachEvent("onPanelResizeFinish",function(){


  var sort_state = object.getSortingState();

alert(sort_state);
  if(sort_state.length){


  object.setSortImgState(true,sort_state[0],sort_state[1]);


  }
 })

         var obj = document.getElementById("image");
         layout.cells("b").attachObject(obj);
         
        



         var object = layout.cells("c").attachGrid();

 

 

Best regards, Stefan


 

 

Answer posted by Stefan Riedel-Seifert on Feb 11, 2009 04:16

Sorry, 

my failure. The resizing of the panel firs the event and corrects the position of the image. But if i resize the window, the
image will be not repositioned.

Best regards, Stefan

Answer posted by Alex (support) on Feb 11, 2009 04:54
You can try to apply the same approach but using "onResizeFinish" event handler.
Answer posted on Feb 11, 2009 05:51
Hi,

this works now pefect!

Best regards, Stefan