Hello!
I have a following problem with subgrid:
When I open subgrid to select value the current selected value is selected but not visible, the scroll position is always on the top.
I try to set scroll manualy on events, but with no success.
Please provide fix or some example how to scroll subgrid to selected value.
Grid’s method can only set internal grid’s sroll. Sub grid hasn’t internal scroll thats wy you are not able to change scroll position for the sub grid. You can set scroll position manually:
var pos = grid.getPosition(subgrid.getRowById(id))
grid.objBox.scrollTop=pos[1]
Please provide information on what subgrid event I need to connect this function?
You can use “onSubGridLoaded”:
mygrid.attachEvent(“onSubGridLoaded”,function(subGrid,rowId,rowInd){
//subGrid - sub grid object
//rowId - related row id
//rowInd - related row index
})
I try this way, but it don’t work.
I think You don’t understand my clearly.
Subgrid scrolling need to called every time user edit cell connected to grid, because every record has different row selected in this subgrid.
It’s some think like this:
| Name | gender
--------------------
1. | Adam | Men
2. | Eve | Female
Where gender is grid connected using subgrid excell, so for 1 record sub grid need to scroll to Men record, but 2 record scroll to Female
What version of dhtmlxGrid do you use? Please contact support@dhtmlx.com and we will send you corrected files.