Categories | Question details Back To List | ||||||||
Row height Hello Support 1. Can I change row height dynamically like setRowHeight(rowId,height)? 2. I have two columns in grid behaving as a rows header just like column header. I want those to be fix(not scrollable). I tried with splitAt function but it changes the column indexes.Can I controlled this. Is there anything I can do in the splitAt method to suit my requirements? I also dont want scrollbar for freeze columns. Answer posted by Support on Mar 26, 2008 03:51 >>1. Can I change row height dynamically like setRowHeight(rowId,height)? Grid can work in two modes - fixed height mode ( default ) - auto height mode - height of row defined by its content height ( grid.enableMultiline(true) ) Basically you can set height of row directly ( its not recommended to use ) by grid.setRowTextStyle(rowId,"height:20px;"); >>2. I have two columns in grid behaving as a rows header just like column header. The only way to achieve such functionality - splitAt functionality >> I tried with splitAt function but it changes the column indexes. Can you please provide more details about problem, while working through grid's API there must not be any changes in usage. >> I also dont want scrollbar for freeze columns. Disabled scrollbar in left part shown to compensate scrollbar in right part, it can be removed by code modification, but in such case count of visible rows may differ in left and right part of grid. Answer posted on Mar 26, 2008 07:23 This is where I have added split function ///////////////////////////////////////////////////////////////////////////////////////////////////////// mygrid.setOnHeaderClickHandler(onHeaderClick); mygrid.init(); mygrid.setColumnColor("#DDE1F7,#DDE1F7"); mygrid.enableEditEvents(true,false,true); mygrid.splitAt(2); .. . . . for( no of attach headers){ str = Here is code which calculate string to pass into attachHeader function. mygrid.attachHeader(str); .} //////////////////////////////////////////////////////////////////////////////////////////////////////// I always have at least one attchHeader . First column dont have anything , It is completely blank. The second column of attchHeader have one checkbox. When I tried with splitAt function, the checkbox get into second column of right part of grid. It means there is some miscalculation of column index. Or May be misplacing of splitAt function. What is the exact problem? Thanks. Answer posted by Support on Mar 26, 2008 11:08 Please try to move splitAt command after attaching additional headers mygrid.init(); ... for( no of attach headers){ str = Here is code which calculate string to pass into attachHeader function. mygrid.attachHeader(str); .} mygrid.splitAt(2); Answer posted by Prasad on Mar 27, 2008 02:38 When I moved splitAt function after the attachHeader, I get complete blank for the fixed column. I got this error(4 times) on my console. c has no properties var cell=(c._childIndexes?c.childNodes[c._childIndexes[col]]:c.childNodes[col]); Is there any other thing except location of splitAt Method? Answer posted by Support on Mar 27, 2008 08:13 Are you using plain text headers or some complex structures ( colspans | rowspans ) in header. Split mode can fail if you are using some complex spaning in left part of splitted grid. If problem still occurs for you - please send any kind of sample where problem can be reconstructed ( you can send it directly to support@dhtmlx.com ) , because I can't reconstruct the same issue with local samples. Attachments (1)
Answer posted by Prasad on Mar 27, 2008 10:35 Thanks. I refer your sample,and follow the exact sequence grid methods. Earlier I was calling 'attachHeader' function after the 'init' method, Now I just move that before the init method. Now Its working perfectly. But now I seen that progress bar of browser is constantly in work. I just debug and found that grid method 'cells' get call infinitely. This occurs only after addition of splitAt function in code. Answer posted by Support on Mar 27, 2008 11:08 I don't think that it related to browser progressbar. The cell method is a core of grid, it is a locator of cell, which executed in most grid related operation ( just moving mouse over grid will cause a lot of its calls , because they used in tooltip generation routines ) If it causes heavy loading | freezing - please send any kind of sample where problem can be reconstructed ( you can send it directly to support@dhtmlx.com ) |