jQuery MiniUI

标题: datagrid 列宽度显示问题 [打印本页]

作者: huihuan29    时间: 2016-6-27 16:20:56     标题: datagrid 列宽度显示问题

datagrid 列宽度为何在IE10+是固定的,然而IE10以下以及其他浏览器如火狐显示的是根据我设定的宽度大小展示的

作者: felt    时间: 2016-6-27 16:31:05

请提供你这个表格的 相关代码,我们测试一下
作者: huihuan29    时间: 2016-6-27 17:17:59

                  <div  class="mini-fit" style="height: 100%;" >  
                        <div id="grid" class="mini-datagrid"  style="width:100%;height:100%;"
                        url="${ctx}/company/companyList.html?id=<%=company_list%>"  showColumnsMenu="true"
                        idField="id" allowResize="true" pageSize="20" allowCellEdit="true"  allowCellSelect="true" multiSelect="true"
                                >
                                <div property="columns">
                                        <div type="indexcolumn"  width= "12" headerAlign="center" align="center" >序号</div>
                                        <div field="id" visible="false"></div>
                                        <div field="name"  width="100"  headerAlign="center" allowSort="false" align="center">企业名称</div>
                                        <div field="region"  width="30" headerAlign="center" allowSort="false" align="center">行政区</div>
                                         <div field="controlLevel"  width="38" headerAlign="center" allowSort="false" align="center">监管级别</div>  
                                        <div field="industry"  width="30" headerAlign="center" allowSort="false" align="center">统计行业</div>
                                        <div field="address"  width="40" headerAlign="center" allowSort="false" align="center">企业地址</div>
                                        <div field="companyType"  width="30" headerAlign="center" allowSort="false" align="center">企业类型</div>
                                        <div field="isstop"  width="30" headerAlign="center" allowSort="false" align="center">企业生产状态</div>
                                        <div field="isreport"  width="30" headerAlign="center" allowSort="false" align="center">运维、停运申报</div>
                                </div>
                        </div>
                 </div>       
作者: felt    时间: 2016-6-27 17:25:11

huihuan29 发表于 2016-6-27 17:17
序号
                                       
                                        企业名称

你所有列都是固定的,只有表格正好等于你设置的宽度和的时候才会按设置的显示
1 如果你需要就是按你设置的宽度显示,表格请设置fitColumns="false"
2 如果你需要大多数列按你设置的宽度显示,请设置一列的宽度是100%,那么只有这列会被自动调整宽度
作者: huihuan29    时间: 2016-6-27 17:32:08

版主两个方法我试过了,好像都不行
作者: huihuan29    时间: 2016-6-27 17:34:46

我使用的浏览器是IE10、IE11没有改变,IE9我侧过是可以的
作者: dforce    时间: 2016-6-28 09:33:55

huihuan29 发表于 2016-6-27 17:34
我使用的浏览器是IE10、IE11没有改变,IE9我侧过是可以的

本地ie11测试了,没发现问题
请确保一下2点
1 doctype是
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 ie只支持标准模式,请不要使用兼容模式




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2