因为只有一条数据,所以准备竖着显示。
这是我用的那个datagrid的代码,我试过修改
">
<thead>
<tr>
<th data-options="field:'pkCompany',width:80,hidden:true">公司编号</th>
<th data-options="field:'companyName',width:120">公司名称</th>
<th data-options="field:'companyAddr',width:120">公司地址</th>
<th data-options="field:'telephone',width:80">联系电话</th>
<th data-options="field:'legalPerson',width:80">公司负责人</th>
<th data-options="field:'license',width:80">营业执照</th>
<th data-options="field:'licenseSt',width:80">使用日期开始</th>
<th data-options="field:'licenseFt',width:80">使用日期截止</th>
<th data-options="field:'isuse',width:80,formatter:formatter1"><select id="isuseSelect"
onchange="doSearch()">
<option value="">是否可用</option>
<option value="1">是</option>
<option value="0">否</option>
</select></th>
<th data-options="field:'remark',width:150">备注</th>
</tr>
</thead>
</table>
为什么表头放左边呢,可以让表头占据两行,数据显示一行。
@毕小宝 我的意思是类似这样的显示,
一条数据用propertygrid,datagrid没有办法设置。
你可以再datagrid的onLoadSuccess中获取数据有几行,只有一行就隐藏datagrid,并且用全局变量存储返回的数据,然后自己调用propertygrid的loadData方法加载返回的这条数据进行显示
$('#dg').datagrid('getPanel').parent().hide()