0

In our application we have a webgrid with a reference column which is never shown. The column is hidden via css, and this works just fine for all major browsers. When printing though, hiding the column the same way in our print.css as we do in the main.css, the column is hidden in Chrome, Firefox and IE up through IE8, but shows up in IE9.

Even more annoying, using the developer tools, if I switch both Browser Mode and Document Mode to IE8, the print works, and then switching both back to IE9, the print out hides the column correctly. This correct behavior persists until I close out of IE entirely. I know it has switched back to IE9 mode though because the formatting changes slightly between the versions. So for some reason, the expected behavior only shows up after switching back to IE9 mode from an older mode.

Here's the css I'm using to hide the column (it's the 11th column in the webgrid):

#gridRequestManagement table tr th + th + th + th + th + th + th + th + th + th + th
{
    width:0 !important;
    display:none !important;
}

Anybody have any insights on what's going on here?

Thanks in advance!

4

1 回答 1

0

这实际上不可能以上述方式解决,似乎其他人也发现了同样的问题并得出了同样的结论。为了解决这个问题,我们删除了 webgrid 的最后一列,并将该列中的值作为隐藏值添加到另一列中以供参考。这是我们能够让网格在 IE9 中表现一致的唯一方法。

于 2013-10-18T17:07:06.293 回答