打印

tabLayout放两个dataGrid ,toolBar显示位置问题

tabLayout放两个dataGrid ,toolBar显示位置问题

<layout:absoluteLayout header="false">
            <layout:panel x="0" y="0" header="false">
               <layout:panelGrid columns="3">
                  <layout:cell>
                     <w:button label="button1" />
                  </layout:cell>
                  <layout:cell>
                     <w:button label="button2" />
                  </layout:cell>
                  <layout:cell>
                     <w:button label="button3" />
                  </layout:cell>
               </layout:panelGrid>
            </layout:panel>

            <layout:tabLayout id="tabs" border="false" jsvar="tabs" height="500" x="0" y="50">
               <layout:panel title="grid1" style="height:200px;overflow: auto;">
                  <w:dataGrid paged="true" rows="20" id="dataGrid1" var="data1" toolBarPosition="bottom">
                  </w:dataGrid>
               </layout:panel>
               <layout:panel title="grid2" style="height:200px;overflow: auto;">
                  <w:dataGrid paged="true" rows="20" id="dataGrid2" var="data2" toolBarPosition="bottom">
                  </w:dataGrid>
               </layout:panel>
            </layout:tabLayout>
         </layout:absoluteLayout>

请问为什么一个标签下的datagrid的toolbar在上面,另一却在下面呢,设置toolBarPosition也不行

TOP

经测试发现第二个datagrid的toolbar并不是在上方,而是由于第二个datagrid高度无法自适应占满tablayout的第二个panel,如果设置datagrid的高度即会发现toolbar在datagrid下方

TOP

新杰可否代码贴出来哈,我设置了datagrid的高度,可是还是没有效果,还是第一个toolbar在上,第二个在下

TOP