如何在DevExpress打印控件中添加一些附加信息

 我来答
蘑菇饭资讯
推荐于2016-01-10 · TA获得超过6万个赞
知道大有可为答主
回答量:1.7万
采纳率:90%
帮助的人:1.3亿
展开全部
1、添加引用
using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Columns;
2、清除已有Columns
this.treelist.Columns.Clear();
3、添加代码
TreeListColumn tc1 = new TreeListColumn();
tc1.Caption = "图书编号";
tc1.VisibleIndex = 0;//此为必须设置的属性,否则无法显示列
TreeListColumn tc2 = new TreeListColumn();
tc2.Caption = "书名";
tc2.VisibleIndex = 1;
TreeListColumn tc3 = new TreeListColumn();
tc3.Caption = "编目";
tc3.VisibleIndex = 2;
TreeListColumn tc4 = new TreeListColumn();
tc4.Caption = "出版日期";
tc4.VisibleIndex = 3;
TreeListColumn tc5 = new TreeListColumn();
tc5.Caption = "作者";
tc5.VisibleIndex = 4;
TreeListColumn tc6 = new TreeListColumn();
tc6.Caption = "出版社";
tc6.VisibleIndex = 5;
TreeListColumn tc7 = new TreeListColumn();
tc7.Caption = "册数";
tc7.VisibleIndex = 6;
this.treelist.Columns.AddRange(new TreeListColumn[] { tc1,tc2,tc3,tc4,tc5,tc6,tc7 } );
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式