Miniui 如何让type="checkcolumn"变为单选
2个回答
展开全部
比如:
<div id="datagrid1" class="mini-datagrid" style="width:800px;height:280px;" allowResize="true"
url="../data/AjaxService.aspx?method=SearchEmployees" idField="id" multiSelect="true"
>
<div property="columns">
<!--<div type="indexcolumn"></div> -->
<div type="checkcolumn" ></div>
<div field="loginname" width="120" headerAlign="center" allowSort="true">员工帐号</div>
<div field="name" width="120" headerAlign="center" allowSort="true">姓名</div>
<div header="工作信息">
<div property="columns">
<div field="dept_name" width="120">所属部门</div>
<div field="position_name" width="100">职位</div>
<div field="salary" dataType="currency" currencyUnit="¥" align="right" width="100" allowSort="true">薪资</div>
</div>
</div>
<div field="createtime" width="100" headerAlign="center" dateFormat="yyyy-MM-dd" allowSort="true">创建日期</div>
<div header="基本信息">
<div property="columns">
<div field="gender" width="100" renderer="onGenderRenderer">性别</div>
<div field="age" width="100" allowSort="true">年龄</div>
<div field="birthday" width="100" renderer="onBirthdayRenderer">出生日期</div>
<div field="married" width="100" align="center" renderer="onMarriedRenderer">婚否</div>
<div field="email" width="100">邮箱</div>
</div>
</div>
<div header="学历信息">
<div property="columns">
<div field="educational_name" width="100">学历</div>
<div field="school" width="120">毕业院校</div>
</div>
</div>
</div>
</div>
只要将datagrid1中的multiSelect="true" 改成multiSelect="false"就可以了
<div id="datagrid1" class="mini-datagrid" style="width:800px;height:280px;" allowResize="true"
url="../data/AjaxService.aspx?method=SearchEmployees" idField="id" multiSelect="true"
>
<div property="columns">
<!--<div type="indexcolumn"></div> -->
<div type="checkcolumn" ></div>
<div field="loginname" width="120" headerAlign="center" allowSort="true">员工帐号</div>
<div field="name" width="120" headerAlign="center" allowSort="true">姓名</div>
<div header="工作信息">
<div property="columns">
<div field="dept_name" width="120">所属部门</div>
<div field="position_name" width="100">职位</div>
<div field="salary" dataType="currency" currencyUnit="¥" align="right" width="100" allowSort="true">薪资</div>
</div>
</div>
<div field="createtime" width="100" headerAlign="center" dateFormat="yyyy-MM-dd" allowSort="true">创建日期</div>
<div header="基本信息">
<div property="columns">
<div field="gender" width="100" renderer="onGenderRenderer">性别</div>
<div field="age" width="100" allowSort="true">年龄</div>
<div field="birthday" width="100" renderer="onBirthdayRenderer">出生日期</div>
<div field="married" width="100" align="center" renderer="onMarriedRenderer">婚否</div>
<div field="email" width="100">邮箱</div>
</div>
</div>
<div header="学历信息">
<div property="columns">
<div field="educational_name" width="100">学历</div>
<div field="school" width="120">毕业院校</div>
</div>
</div>
</div>
</div>
只要将datagrid1中的multiSelect="true" 改成multiSelect="false"就可以了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询