Categories | Question details Back To List | ||
Scroll on Split Hi I have a treegrid several columns and use splitAt(1). it does as it is supposed to and splits the grid with the first column (the tree part of the grid) having its on scroll bar, and the rest of the columns having their own scrollbar. i would like to know if it is possible so when someone adds folders to the tree part - if the length of the folder text is too long to add in the window the scroll will allow them to scroll to the right for them to see the rest of the text (instead of clicking and dragging the column as i want the column width to be static) thanks Answer posted on Oct 09, 2007 14:54 Actually scroll can be active in both parts. While API doesn't provide legal way to achieve such functionality it can be done as mygrid.splitAt(1); mygrid.setColWidth(0,"1000px"); mygrid._fake._correctSplit(100); where 1000px - scroll width of first column 100 - offset width of first column Answer posted on Oct 10, 2007 16:40 Hi, thanks for the reply, this works great except one thing If i click on the tree node to select the row the tree first split (tree column) goes to the right hand side of the 1000px. of course i would like it to stay exactly where they have got it instead of moving when they select the row thanks for your help Answer posted on Oct 19, 2007 05:21 Please reply - the question was asked 9 days ago Answer posted by Stanislav on Oct 19, 2007 07:43 Sorry, I missed your second question. This functionality is result of default selection routine which mostly oriented for single part grid and may cause not such good results in case of split. There is no API call to disable it, but you can made small modification to existing js code In dhtmlxGrid.js please locate next line ( line 1175 in latest js ) this.moveToVisible = function(cell_obj,onlyVScroll){ and replace it with this.moveToVisible = function(cell_obj,onlyVScroll){ onlyVScroll=true; Answer posted on Oct 20, 2007 10:26 Works perfectly Thanks !!! |