eListControl列表控件
| 名称 |
数据类型 |
描述 |
| LineHeight |
int |
行高 |
| Class |
string |
样式名称 |
| Border |
int |
边框 |
| CellPadding |
int |
填充 |
| CellSpacing |
int |
间距 |
| Width |
string |
宽度 |
| Attributes |
string |
其他属性 |
| Columns |
Dictionary |
所有列集合 |
| UserColumns |
Dictionary |
用户自定义列集合 |
| OrderByItems |
Dictionary |
允许排序列集合 |
| DataSource |
DataTable |
数据源 |
| BodyMove |
bool |
允许改变行位置 默认为false |
| BodySize |
bool |
允许改变行高 默认为false |
| ShowMenu |
bool |
显示菜单 默认为false |
| AddControl() |
|
添加列 |
| getControlHTML() |
|
生成控件HTML |
HTML
<ev:eListControl ID="eListControl1" LineHeight="40" runat="server" >
<ev:eListColumn FieldName="序号" width="80" runat="server">{row:index}</ev:eListColumn>
<ev:eListColumn FieldName="姓名" Field="FullName" runat="server" />
<ev:eListColumn FieldName="性别" Field="Sex" Options="[{text:男,value:1},{text:女,value:2}]" ReplaceString="[{text:不详,value:0}]" runat="server" />
<ev:eListColumn FieldName="学历" Field="Education" BindObject="Demo_Dictionaries" BindText="Name" BindValue="ID" runat="server" />
<ev:eListColumn FieldName="身高" Field="Height" FormatString="{0:F2}" runat="server" />
<ev:eListColumn FieldName="添加时间" Field="addTime" Width="150" FormatString="{0:yyyy-MM-dd HH:mm:ss}" runat="server" />
</ev:eListControl>
CS
eList elist1 = new eList("Demo_Persons");
elist1.Rows = 5;
elist1.Bind(eListControl1);