I'm working width WedDataGrid 10.2 in Visual Studio 2008/Framework 3.5. When I set the width of each grid column in the designer, the column header for each column is rendered 1px narrower than the rest of the column. I've tried adding an additional pixel of padding but this did not work. After looking through the page source I found that for a 50px column, the width on the column header is set to 49px. Any help or workarounds would be appreciated.
Thanks!
For anyone who has this problem, here's what I did to get around it.
function syncHeaderFooterWidths(grid){ var cols = grid.get_columns(); var colCount = cols.get_length(); var i; if (grid._header != null) { var headerCells = grid._header.getElementsByTagName("th"); if (headerCells != null) { for (i = 0; i < colCount; i++) { headerCells[i].style.width = cols.get_column(i).get_width(); } } } if (grid._footer != null) { var footerCells = grid._footer.getElementsByTagName("th"); if (footerCells != null) { for (i = 0; i < colCount; i++) { footerCells[i].style.width = cols.get_column(i).get_width(); } } }}
Where are you calling this from?