Categories | Question details Back To List | ||||||||
rowspan/colspan Hi support I have 4rows by 4 cols grid. If I make rowspan of the first cell (first row)to 4, the first column contains only one cell. Now if called mygrid.cells(row2,0).getValue() to the first cell of the second row, I should get null or empty data. But here I am getting data of the second cell of second row. How to resolve? Answer posted by support on Apr 28, 2008 01:57 >>Now if called mygrid.cells(row2,0).getValue() to the first cell of the second row, I should get null or empty data. Actually the command above has not sense, there is no such cell in grid ( in first column you have only one cell, at 0,0 position ) so you are referring to not existing cell, as result the returned value is not valid. Answer posted by Prasad on Apr 28, 2008 02:21 Thanks. Its true that I am trying to get the data of cell which is not exist, But then why I am getting the data of the next cell? Is it possible to get some info or error when we are trying to access the cell which is not exist(because of merge functionality). Answer posted by Support on Apr 28, 2008 03:18 >> But then why I am getting the data of the next cell? This is side effect, caused by grid structure. ( actually it is fall back used for colspans, from grid's perspective rowspan is a set of colspans ) >>I should get null or empty data. If necessary , we can provide some kind of patch, which will provide requested functionality ( return empty value for not existing cells ) We not plan to add similar functionality ( at least not in next version ) , because some other behaviors based on this effect. Answer posted by Prasad on Apr 28, 2008 03:25 Thanks. When you are planning to add such functionality? We need this functionality as early as possible. If you want, I can mail you with reference number. Answer posted by Support on Apr 28, 2008 06:29 You can use attached js file in addition to existing ones ( or just copy its content to the end of dhtmlxgrid.js ) With it you can issue next command grid.strictCells(); after it, getValue will return null for not existing cells. Attachments (1)
Answer posted by Prasad on Apr 28, 2008 06:59 Thanks for Help. 1. The location for grid.strictCells(); should be before initialization or after initialization. 2. >>We not plan to add similar functionality ( at least not in next version ) , because some other behaviors based on this effect. Use of this functionality have any effect on other current functionality? If yes then a. plz list that functionality. b. Should we wait for complete newer version of dhtmlxgrid? Or You recommend us to use this js without fear. Answer posted by Support on Apr 28, 2008 07:47 >> should be before initialization or after initialization. doesn't really matter, can be called at any time >> Use of this functionality have any effect on other current functionality? Some inner functionality relay on getValue methods but such update must not critically harm anything. Most serious problem - the cells included in colspan will be counted as cells with empty value while sorting >>Should we wait for complete newer version of dhtmlxgrid The next version of grid will not introduce solution for the problem. Most probably it will be resolved in one of next version, but for now provided patch is the only solutions. |