Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
grid colspan不适用于GWT中的IE_Gwt - Fatal编程技术网

grid colspan不适用于GWT中的IE

grid 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…我假设您使用的是网格类

我是在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…

我假设您使用的是
网格
类。此类不用于灵活的列和行,因此不支持设置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中都存在一个bug
getElement(…).setAttribute(“colspan,…)
对我来说很有用,用GWT 2.6Yep测试过,就是这样,IE(IE 11中也是如此)或GWT中都有一个bug<代码>getElement(…).setAttribute(“colspan,…)对我有用,用GWT2.6测试过