彩票走势图

[WPF]Devexpress GridControl使用方法总汇

原创|其它|编辑:郝浩|2012-10-16 13:34:52.000|阅读 3903 次

概述:本文总结了Devexpress GridControl WPF版本一些常用的使用方法。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

本文总结了Devexpress GridControl WPF版本一些常用的使用方法。

1.设置最下面的总计行:

gridcontrol.TotalSummary.Add(new GridSummaryItem()
       				{SummaryType=SummaryItemType.Count, 
				 FieldName = "SID", 
				 DisplayFormat = "总记录数:{0:0}"});

显示效果如下:

[WPF]Devexpress GridControl使用方法总汇

参数:

SummaryItemType:聚合类型:Devexpress已经具备常用的方法了,基本够用,实在不够用可以使用Custom;

[WPF]Devexpress GridControl使用方法总汇

FieldName:统计列名;

DisplayFormat:显示格式;

2.隐藏分组的Panel:

tableView1.ShowGroupPanel = false;

3.设置当前焦点单元格为编辑状态(光标移入):

tableView1.ShowEditor();

此方法写入OnLoad无效,写入Loaded有效。

4.Devexpress汉化方法:

1).引用汉化DLL文件:DevExpress.LocalizationWPF.v11.2.dll

2).加入如下代码:

DevExpress.Xpf.Core.DXMessageBoxLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfCoreDXMessageBoxLocalizationCHS();
DevExpress.Xpf.Core.Localization.TabControlLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfCoreLocalizationCHS();
EditorLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfEditorsLocalizationCHS();
DevExpress.Xpf.Docking.Base.DockingLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfDockingLocalizationCHS();
GridControlLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfGridLocalizationCHS();
DevExpress.Xpf.Printing.PrintingLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfPrintingLocalizationCHS();
DevExpress.Xpf.Ribbon.RibbonControlLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfRibbonLocalizationCHS();
DevExpress.Xpf.RichEdit.Localization.XpfRichEditLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXpfRichEditLocalizationCHS();
DevExpress.XtraRichEdit.Localization.XtraRichEditLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraRichEditLocalizationCHS();



标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@cahobeh.cn

文章转载自:Tiramis-博客园

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP