grid colspan不适用于GWT中的IE
我是在GWT中创建网格的 并为一行设置属性colspangrid colspan不适用于GWT中的IE,gwt,Gwt,我是在GWT中创建网格的 并为一行设置属性colspan gridSample.setWidget(0, 0, new HTML("Can you improve this checklist? Please rank and submit your comments below")); gridSample.getCellFormatter().getElement(0, 0).setAttribute("colspan", "4"); colspan不适用于IE…我假设您使用的是网格类
gridSample.setWidget(0, 0, new HTML("Can you improve this checklist? Please rank and submit your comments below"));
gridSample.getCellFormatter().getElement(0, 0).setAttribute("colspan", "4");
colspan不适用于IE…我假设您使用的是
网格
类。此类不用于灵活的列和行,因此不支持设置colspan。如果要设置colspan,请使用类FlexTable
。它确实支持colspan。在您使用FlexTable时,它看起来:
gridSanple.getFlexCellFormatter().setColSpan(0, 0, 4);
但是,请注意,
FlexTable
比Grid
慢得多。因此,如果您有一个大表,这可能是一个问题。我假设您使用的是网格
类。此类不用于灵活的列和行,因此不支持设置colspan。如果要设置colspan,请使用类FlexTable
。它确实支持colspan。在您使用FlexTable时,它看起来:
gridSanple.getFlexCellFormatter().setColSpan(0, 0, 4);
但是,请注意,
FlexTable
比Grid
慢得多。因此,如果您有一个大表,这可能是一个问题。在IE中有bug。当我使用:
flexTable.getCellFormatter().getElement(hNum, 0).setAttribute("colspan", ""+colCount);
GWT将属性名写为“colSpan”,大写为S,用于IE(如果在IE中打开了developer tools,我可以看到它),但IE8忽略了它,当我修改为“colSpan”时,它可以正常工作。
但我不知道,如何在GWT中修复它。。。GWT自己写的。。。
但它确实有效
flexTable.getFlexCellFormatter().setColSpan(hNum, 0, colCount);
在IE中有bug。当我使用:
flexTable.getCellFormatter().getElement(hNum, 0).setAttribute("colspan", ""+colCount);
GWT将属性名写为“colSpan”,大写为S,用于IE(如果在IE中打开了developer tools,我可以看到它),但IE8忽略了它,当我修改为“colSpan”时,它可以正常工作。
但我不知道,如何在GWT中修复它。。。GWT自己写的。。。
但它确实有效
flexTable.getFlexCellFormatter().setColSpan(hNum, 0, colCount);
试试这个:
gridSample.getCellFormatter().getElement(0, 0).setAttribute("colSpan", "4")
我的意思是用colSpan
代替colSpan
试试这个:
gridSample.getCellFormatter().getElement(0, 0).setAttribute("colSpan", "4")
我的意思是使用
colSpan
而不是colSpan
是的,就是这样,IE(IE 11中也是如此)或GWT中都存在一个buggetElement(…).setAttribute(“colspan,…)
对我来说很有用,用GWT 2.6Yep测试过,就是这样,IE(IE 11中也是如此)或GWT中都有一个bug<代码>getElement(…).setAttribute(“colspan,…)对我有用,用GWT2.6测试过