eFrameWork官网 注册  登录
eFrameWork框架
联系我们



 在eFrameWork框架中使用EasyUI DataGrid

作者: 发布日期:2018-06-27 人气:267
1.HTML:
<h3 style="margin-bottom:8px;">示例一</h3>
<ev:eListControl ID="eDataTable" PageSize="5" class="easyui-datagrid" style="width:100%;height:260px;" Attributes="url=&quot;easyUIDataGrid.aspx?obj=edatatable&quot; rownumbers=&quot;true&quot; pagination=&quot;true&quot; method=&quot;get&quot; pageList=&quot;[5,10, 15,20, 30, 40]&quot; singleSelect=&quot;true&quot;" runat="server" >
<ev:eListColumn FieldName="序号" Name="F1" width="80" runat="server">{row:number}</ev:eListColumn>
<ev:eListColumn FieldName="姓名" Name="F2" Field="FullName" runat="server" />
<ev:eListColumn FieldName="性别" Name="F3" Field="Sex" Options="[{text:男,value:1},{text:女,value:2}]" ReplaceString="[{text:不详,value:0}]" runat="server" />
<ev:eListColumn FieldName="密码" Name="F4" Field="PassWord" ControlType="PassWord" runat="server" />
<ev:eListColumn FieldName="学历" Name="F5" Field="Education" Width="100" BindObject="Demo_Dictionaries" BindText="Name" BindValue="ID" runat="server" />
<ev:eListColumn FieldName="身高" Name="F6" Field="Height" Width="100" FormatString="{0:F2}" runat="server" />
<ev:eListColumn FieldName="添加时间" Name="F7" Field="addTime" Width="150" FormatString="{0:yyyy-MM-dd HH:mm:ss}" runat="server" />
</ev:eListControl>

2.CS:
eList elist = new eList("Demo_Persons");
elist.OrderBy.Add("ID Desc");
elist.EasyUIDataGrid(eDataTable);

3.运行效果:


 ↓ 评论信息

暂时还没有评论!

 ↑ 发表评论

登录 后评论!
版权所有 © 2016-2020 中国E客 EKETEAM.COM