Categories | Question details Back To List | ||
Adding column mangles header I have a grid with 3 columns that has been working great. It has columns headers that include automatic text filtering. I tried to add another column, but the headers are getting mangled. All 4 columns show up in the grid, but only the 1st and 3rd header name and text filters show up now. So the 1st is in the right spot, but the 2nd column header is incorrect. The 3rd and 4th columns now have no header or filter at all. Here is the working version: var commonImgs = "codebase/imgs/"; var columnsShown = "Bug Number, Subject, Status"; var columnSorts = "int,str,int"; var columnAlign = "left,left,left"; var columnFilter = "#text_filter,#text_filter,#text_filter"; mygrid255 = new dhtmlXGridObject('a_grid255'); mygrid255.setImagePath(commonImgs); mygrid255.setHeader(columnsShown); mygrid255.attachHeader(columnFilter); mygrid255.setInitWidths("150,*,100"); mygrid255.setColAlign(columnAlign); mygrid255.setSkin("light"); mygrid255.init(); mygrid255.loadXML("xmlresults/bugs255.xml"); mygrid255.setColSorting(columnSorts); Here are the changesthat result in the mangle: var columnsShown = "Bug Number, Subject, Status, User Name"; var columnSorts = "int,str,int,str"; var columnAlign = "left,left,left,left"; var columnFilter = "#text_filter,#text_filter,#text_filter,#text_filter"; Also, the bugs255.xml was updated to contain another <cell>foo</cell> in each row. As stated above, the new column's data is shown fine in the grid, and xml is valid. Only the headers are the problem. The 2 headers that do show up still have the sort and filter working. Thanks, Tim Answer posted by Support on Feb 18, 2009 09:09 You have one more line , which need to be updated mygrid255.setInitWidths("150,*,100"); This line need to be updated with width of 4th column as well. |