Categories | Question details Back To List | ||
subgrid selected record positioning 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. Answer posted by dhxSupport on Mar 11, 2009 06:22 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)) Answer posted by ez on Mar 11, 2009 06:54 Please provide information on what subgrid event I need to connect this function? Answer posted by dhxSupport on Mar 11, 2009 07:10 You can use "onSubGridLoaded": mygrid.attachEvent("onSubGridLoaded",function(subGrid,rowId,rowInd){ //subGrid - sub grid object //rowId - related row id //rowInd - related row index }) Answer posted by ez on Mar 11, 2009 08:16 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 Answer posted by dhxSupport on Mar 11, 2009 10:07 What version of dhtmlxGrid do you use? Please contact support@dhtmlx.com and we will send you corrected files. |