Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by san on Mar 14, 2008 22:07
open dhtmlx forum
SubGrid with in a Grid

How do i set the height, width and overflow property for the subgrid that is loaded when a sub_row is expanded and collapsed. I was if there was a way to do it from xml.
Answer posted by Support on Mar 17, 2008 06:26
There is no API to do this.
But we made some changes in the dhtmlxgrid_sub_row.js file, which allow to change the height of the subgrid.
In case of using this file version the overflow is not hidden by default. And height can be changed by the following approach:

grid.attachEvent("onSubGridCreated", func)

function func(sgrid){

        sgrid.enableAutoHeight(true,maxHeight)

        sgrid.setSizes()

        return true;
})
Where max height is the maximum height of the sub grid before the vertical scroll appears.

Attachments (1)