随笔分类 - DevExpress
摘要:private void BtnGpsExportAll_Click(object sender, EventArgs e) { if (backgroundWorker1.IsBusy) { MessageDxUtil.ShowTips("正在执行轨迹导出,请稍后在尝试!"); return; }
阅读全文
摘要:/// <summary> /// 绑定数据后,分配各列的宽度 /// </summary> private void GridView1_DataSourceChanged(object sender, EventArgs e) { if (this.winGridViewPager1.gridV
阅读全文
摘要:问题描述: DevExpress v11.2中的GridControl 每次运行程序的时候此控件都会自动选中第一行,是否可以实现运行时不选中任何行? 问题解答: 如果你的数据源不为空的话,XtraGrid总会有一个聚焦行。FocusedRowHandle是与CurrencyManager.Posit
阅读全文
摘要:使用GridFormatRule 可以轻松设置GridControl中的格式化规则,这些规则的使用可以方便的控制显示,区别不同的数据格式。参见链接: FormatConditionRuleExpression Expression Operators, Functions, and Constant
阅读全文
摘要:场景 在Winform中一般弹出对话框使用的是MessageBox,而在 DevExpress中使用的是XtraMessageBox实现对话框。 效果 实现 首先新建确认按钮的调用方法: public DialogResult Confirm(string strString) { return D
阅读全文
摘要:dev的XtraMessageBox控件使用起来很美观,但默认显示确定的是英文,如下图: 通过下面代码可使“OK”显示为中文:首先创建一个继承自Localizer的类: using DevExpress.XtraEditors.Controls; public class MessboxClass
阅读全文
摘要://方法1SaveFileDialog fileDialog = new SaveFileDialog(); fileDialog.Title = "导出Excel"; fileDialog.Filter = "Excel文件(*.xls)|*.xls"; DialogResult dialogRe
阅读全文
摘要:1 //显示行号 2 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) 3 { 4 e.Appe
阅读全文
摘要:GridView整行一条或者多行复制到剪贴板 private void menu_CopyInfo_Click(object sender, EventArgs e) { int[] selectedRow = this.gridView1.GetSelectedRows(); if (select
阅读全文
摘要:1 public Form1() 2 { 3 InitializeComponent(); 4 gridControl1.DataSource = CreatDataTable(); 5 gridView1.OptionsBehavior.Editable = false; 6 //gridView
阅读全文