Primefaces数据类型colspan列宽度 - 不工作 [英] Primefaces datatable colspan column width - Not Working

查看:411
本文介绍了Primefaces数据类型colspan列宽度 - 不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为一些(不是所有)列创建固定列宽的一个primfaces数据。
tableheader有3行,colspan和rowspan。我想现在修复a下的第一列的宽度。第二列应该是动态的。



如果没有Colspan,我可以使用Header Column元素的width属性。但现在我不能使用标题列,因为它是两列。将忽略正常列的宽度。 (width =30and style =width:30px;)



我添加了一个问题的屏幕截图( http://s14.directupload.net/images/140717/z2a7vbrj.png )。第一个表是正确和完整的HTML(自写)第二个表是在以下代码片段中看到的primefaces datatable:

  ; p:dataTable var =produktkenntniss
value =#{xyz}>

< p:columnGroup type =header>
< p:row>
< p:column rowspan =3colspan =2
headerText =a/>
< p:column colspan =2
headerText =b/>
< p:column colspan =5
headerText =c/>
< p:column rowspan =3
headerText =d/>
< / p:row>
< p:row>
< p:column rowspan =2
headerText =e/>
< p:column rowspan =2
headerText =f/>
< p:column colspan =2
headerText =g/>
< p:column colspan =2
headerText =h/>
< p:column headerText =i/>
< / p:row>
< p:row>
< p:column
headerText =j/>
< p:column headerText =k/>
< p:column
headerText =l/>
< p:column headerText =m/>
< / p:row>
< / p:columnGroup>

< p:column width =30>
< h:outputText
value =n/>
< / p:column>
< p:column>
< h:outputText
value =o/>
< / p:column>
...

我希望有人能帮助我!



最好的祝福



Simon

解决方案

它不支持可滚动数据表,请查看(数据可滚动与分组)列宽问题


i try to create a primefaces datatable with fixed column width for some(not all) columns. The tableheader got 3 rows with colspan and rowspan. I want now to fix the width of the first column under "a". The second column should be dynamic.

Without Colspan i could use the width attribute of the Header Column element. But now i cant use the header column because it is for two columns. The width for the normal Column is ignored. (width="30" and style="width:30px;")

I added a screenshot of my Problem(http://s14.directupload.net/images/140717/z2a7vbrj.png). The first Table is correct and complete HTML(self written) the second Table is primefaces datatable seen in the following code snippet:

<p:dataTable var="produktkenntniss"
            value="#{xyz}">

            <p:columnGroup type="header">
                <p:row>
                    <p:column rowspan="3" colspan="2"
                        headerText="a" />
                    <p:column colspan="2"
                        headerText="b" />
                    <p:column colspan="5"
                        headerText="c" />
                    <p:column rowspan="3"
                        headerText="d" />
                </p:row>
                <p:row>
                    <p:column rowspan="2"
                        headerText="e" />
                    <p:column rowspan="2"
                        headerText="f" />
                    <p:column colspan="2"
                        headerText="g" />
                    <p:column colspan="2"
                        headerText="h" />
                    <p:column headerText="i" />
                </p:row>
                <p:row>
                    <p:column
                        headerText="j" />
                    <p:column headerText="k" />
                    <p:column
                        headerText="l" />
                    <p:column headerText="m" />
                </p:row>
            </p:columnGroup>

            <p:column width="30">
                <h:outputText
                    value="n" />
            </p:column>
            <p:column>
                <h:outputText
                    value="o" />
            </p:column>
            ...

I hope someone can help me!

Best regards

Simon

解决方案

it is unsupported with scrollable datatable, have a look at (Datatable Scrollable with Grouping column width issue)

这篇关于Primefaces数据类型colspan列宽度 - 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆