Categories | Question details Back To List | ||
Read/write by column Hi... how can I parse by complete column? i have this... <row id="1"> <cell>00</cell> <cell>0000:value</cell> </row> <row id="2"> //Second Column <cell>00</cell> <cell>0000:value</cell> </row> <row id="3"> //First Column <cell>01</cell> <cell>0100:value</cell> </row> Want to read in this order... fisrt cell-first column, then second cell-First column, Then First cell- Second column. Is it posible or must rewrite xml code? In that case, could you send me an xml sample, writed by entire column? Dont know how to do it. Thanks! Answer posted by Support on Jun 30, 2008 09:40 >>Is it posible or must rewrite xml code? In that case, could you send me
an xml sample, writed by entire column? Dont know how to do it. Grid is row centric and it is pretty hard to import XML in such format. You can check http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Custom_loading_types.html#grid_art_custloadtypes But the more simple approach will be to use server side XSLT transformation, to translate data in your format in common grid's format. Answer posted by Ale on Jun 30, 2008 11:41 ok thanks. I think its more simple than do that. The reason of all of it, is that I must paint cells depending on the cell value. (fo e.g. if cell 1,1 (first column) has the value "4", then cells 1,2 1,3 and 1,4 must be green background) So Ive been thinking ..... once Ive got the xml, im gonna go through the grid with javascript (by entire column) and change the style. Must use the mygrid.forEachRow, and a "for column loop " to solve the thing, uh? Do you have an example to do that? (I dont wanna be lazy, but have few time ...) Answer posted on Jul 01, 2008 01:30 >>and a "for column loop " to solve the thing, uh? Yes, it is one of possible solutions. >>Do you have an example to do that? mygrid.forEachRow(function(id){ if (mygrid.cells(id,0).getValue==4){ mygrid.cells(id,1).cell.style.backgroundColor="green"; mygrid.cells(id,2).cell.style.backgroundColor="green"; mygrid.cells(id,3).cell.style.backgroundColor="green"; } }) Answer posted by Ale on Jul 01, 2008 06:23 Thanks for all, very helpfull. |