Categories | Question details Back To List | ||
Grid and XML Configuration I have a question regarding the grid. Can I loadfromxmlstring like the toolbar? I keep getting "window.getComputedStyle(this.entBox, null) is null" error on initialisation. Any ideas? Cheers Scott. Answer posted by dhxSupport on May 13, 2009 03:29 Yes, you can load grid form xml string. Please see more information here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Loading_data_in_grid.html#grid_art_loadingdata >>I keep getting "window.getComputedStyle(this.entBox, null) is null" error on initialisation. dhtmlxGrid and dhtmlxWindow havent method getComputedStyle. Such issue may occur if this.entBox is not defined. Answer posted by squatss on May 13, 2009 03:57 It appears that entbox is undefined but I am unsure as to what I have done wrong. All I am calling is: grd = new dhtmlXGridObject("gridResults"); and the div object gridResults exists. Answer posted by dhxSupport on May 13, 2009 03:59 Could you please send us sample where we can reproduce this issue? Answer posted by squatss on May 13, 2009 07:45 I have managed to fix the entbox issue but I have a question regarding loding xml. Is it only data that can be loaded IE no <head> tags when doing a grid.parse(). The reason being, the following xml is being rejected as bad xml: <rows> <head> <beforeInit> <call command="setSkin"> <param>'light'</param> </call> <call command="setImagePath"> <param>'../imgs/dhxgrid/'</param> </call> <call command="enableMultiselect"> <param>true</param> </call> <call command="attachEvent"> <param>'onRowDblClicked'</param> <param>viewCase</param> </call> <call command="enableRowsHover"> <param>true</param> <param>'test'</param> </call> </beforeInit> <column width="50" type="ro" align="right" sort="str">App Number</column> <column width="80" type="ro" align="left" sort="str">filingdate</column> <column width="80" type="ro" align="left" sort="str" hidden="true">title</column> <column width="80" type="ro" align="left" sort="str">status</column> <column width="80" type="ro" align="left" sort="str">name</column> <column width="80" type="ro" align="left" sort="str">address1</column> <column width="80" type="ro" align="left" sort="str" hidden="true">address2</column> <column width="80" type="ro" align="left" sort="str" hidden="true">town</column> <column width="80" type="ro" align="left" sort="str">country</column> <column width="80" type="ro" align="left" sort="str">postcode</column> <column width="80" type="ro" align="left" sort="str">email</column> <column width="80" type="ro" align="left" sort="str">updated</column> <column width="80" type="ro" align="left" sort="str">updatedby</column> </head> <row> <applicationnumber>GB12345678.00</applicationnumber> <filingdate>2008-01-01T00:00:00</filingdate> <title>some title text</title> <status>Added to DAS Managment</status> <name>Scott Thomas</name> <address1>123</address1> <address2>Squirrel wood road</address2> <town>newport</town> <country>wales</country> <postcode>np12 3fv</postcode> <email>scott.thomas@IPO.gov.uk</email> <updated>Scott Thomasd</updated> <updatedby>2009-05-01T00:00:00</updatedby> </row> <row> <applicationnumber>GB12345679.00</applicationnumber> <filingdate>2008-01-01T00:00:00</filingdate> <title>some title text</title> <status>Added to DAS Managment</status> <name>Scott Thomas</name> <address1>123</address1> <address2>Squirrel wood road</address2> <town>newport</town> <country>wales</country> <postcode>np12 3fv</postcode> <email>scott.thomas@IPO.gov.uk</email> <updated>Scott Thomasd</updated> <updatedby>2009-05-01T00:00:00</updatedby> </row> </rows> Answer posted on May 13, 2009 08:52 You loading grid not from the standart format. To load grid from custom format you shuld specify which tag will be used as cell. Please see more information here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Custom_loading_types.html#grid_art_custloadtypes |