evExpress2011 ASPXTreeList 范例2: ASPxTreeList杂项设置
2011-09-30 12:45
387 查看
1、交替的节点颜色设置
属性—>Styles->AlternationgNode->BackColor
2、网格线与树线条
属性->Settings->GridLines
属性->Settings->ShowTreeLines
3、条件格式
ASPxTreeList允许你对个别数据Cell或者是完整节点设置个性化样式设计 ,你可以使用HtmlDataCellPrepared or
HtmlRowPrepared 方法去设置你需要的设置
例如上例中添加
protected void treeList_HtmlDataCellPrepared(object sender,
DevExpress.Web.ASPxTreeList.TreeListHtmlDataCellEventArgs e)
{
if (Object.Equals(e.GetValue("dptname"), "部门1A"))
e.Cell.Font.Bold = true;
}
4、节点
多行选择
1. SettingsSelection.Enabled 属性设置为True
2. SettingsSelection.AllowSelectAll 属性设置为 true
3. SettingsSelection.Recursive 反选属性设置为true
5、数据导出
ASPxTreeList 很容易的使用ASPxTreeListExporter组件导出数据
treeListExporter.WriteRtfToResponse();
treeListExporter.WriteXlsxToResponse();
treeListExporter.WriteXlsToResponse();
treeListExporter.WritePdfToResponse();
6、数据分页
SettingsPager.Mode 属性设置为 ShowPager.
7、数据统计
AspxTreeList 能使你进行单列或一组节点的计算统计,显示的结果在页脚的单元。AspxTreeList提供5个嵌入聚集函数 (count
,max,min等等)
步骤一 把Settings.ShowFooter属性设置为
true.
步骤二 组页脚显示 Settings.ShowGroupFooter属性设置为
true.
<Settings ShowGroupFooter="True" ShowFooter="True" GridLines="Both" />
<Summary>
<dx:TreeListSummaryItem FieldName="dptname" ShowInColumn="
dptname " SummaryType="Count" />
</Summary>
如果在代码里写。。。
private void TreeDataBind()
{
string Sql="select
* from com_Dpt";
DataSet ds= db.ExecuteDataSet(System.Data.CommandType.Text,
Sql);
treeList.DataSource
=ds.Tables[0];
treeList.KeyFieldName = "dptid";
treeList.ParentFieldName = "dptfatherid";
TreeListSummaryItem a
= new TreeListSummaryItem();
a.FieldName = "dptName";
a.ShowInColumn
= "dptName";
a.SummaryType = DevExpress.Data.SummaryItemType.Count
;
treeList.Summary.Add(a);
treeList.DataBind();
}
属性—>Styles->AlternationgNode->BackColor
2、网格线与树线条
属性->Settings->GridLines
属性->Settings->ShowTreeLines
3、条件格式
ASPxTreeList允许你对个别数据Cell或者是完整节点设置个性化样式设计 ,你可以使用HtmlDataCellPrepared or
HtmlRowPrepared 方法去设置你需要的设置
例如上例中添加
protected void treeList_HtmlDataCellPrepared(object sender,
DevExpress.Web.ASPxTreeList.TreeListHtmlDataCellEventArgs e)
{
if (Object.Equals(e.GetValue("dptname"), "部门1A"))
e.Cell.Font.Bold = true;
}
4、节点
多行选择
1. SettingsSelection.Enabled 属性设置为True
2. SettingsSelection.AllowSelectAll 属性设置为 true
3. SettingsSelection.Recursive 反选属性设置为true
5、数据导出
ASPxTreeList 很容易的使用ASPxTreeListExporter组件导出数据
treeListExporter.WriteRtfToResponse();
treeListExporter.WriteXlsxToResponse();
treeListExporter.WriteXlsToResponse();
treeListExporter.WritePdfToResponse();
6、数据分页
SettingsPager.Mode 属性设置为 ShowPager.
7、数据统计
AspxTreeList 能使你进行单列或一组节点的计算统计,显示的结果在页脚的单元。AspxTreeList提供5个嵌入聚集函数 (count
,max,min等等)
步骤一 把Settings.ShowFooter属性设置为
true.
步骤二 组页脚显示 Settings.ShowGroupFooter属性设置为
true.
<Settings ShowGroupFooter="True" ShowFooter="True" GridLines="Both" />
<Summary>
<dx:TreeListSummaryItem FieldName="dptname" ShowInColumn="
dptname " SummaryType="Count" />
</Summary>
如果在代码里写。。。
private void TreeDataBind()
{
string Sql="select
* from com_Dpt";
DataSet ds= db.ExecuteDataSet(System.Data.CommandType.Text,
Sql);
treeList.DataSource
=ds.Tables[0];
treeList.KeyFieldName = "dptid";
treeList.ParentFieldName = "dptfatherid";
TreeListSummaryItem a
= new TreeListSummaryItem();
a.FieldName = "dptName";
a.ShowInColumn
= "dptName";
a.SummaryType = DevExpress.Data.SummaryItemType.Count
;
treeList.Summary.Add(a);
treeList.DataBind();
}
相关文章推荐
- (DevExpress2011控件教程)ASPXTreeList 范例3: ASPxTreeList 增删改编辑
- (DevExpress2011控件教程)ASPxTreeList 范例1 :如何绑定数据到ASPxTreeList
- (DevExpress2011控件教程)ASPXTreeList 范例2: ASPxTreeList杂项设置
- ASPxTreeList 未将对象引用设置到对象的实例
- DEV winform treelist设置背景图像
- DevExpress控件使用系列--ASPxTreeList
- ASPxTreeList及ASPxGridView使用
- ASPxTreeList 递归树 嵌入丛表 树形结构演示
- DevExpress控件使用系列--ASPxTreeList
- Flex中如何通过给openItems属性,设置一个XMLList或Array对象来打开Tree的一个节点
- ASPxTreeList 代码绑定数据(ASP.NET第三方控件) .
- (DevExpress2011控件教程)ASPxGridView 范例3 :ASPxGridView 排序和分组、过滤行、统计功能等功能实现
- DevExpress ASP.NET 使用经验谈(7)-ASPxTreeList控件使用
- DevExpress的使用(一)ASPxTreeList
- ASPxTreeList及ASPxGridView使用
- aspxtreelist 新增节点时获取节点的级数
- DevExpress Asp.net(7) ASPxTreeList的基本使用之一
- [AspxTreeList]常用方法
- Dev控件用法 aspxTreeList 无刷新 aspxGridView 数据
- DevExpress Asp.net ASPxTreeList的基本使用之一