Loading

摘要: #region [设定ComboBox数据源] private Dictionary<string, string> GetScoreStatus() { Dictionary<string, string> dic = new Dictionary<string, string> { {"2", 阅读全文
posted @ 2020-10-14 14:31 云辰 阅读(257) 评论(0) 推荐(0)
摘要: DialogResult result = MessageBox.Show($"当前失败数据共计{failCount}条,是否上传?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResu 阅读全文
posted @ 2020-10-14 14:29 云辰 阅读(268) 评论(0) 推荐(0)
摘要: /// <summary> /// 绑定数据后,分配各列的宽度 /// </summary> private void GridView1_DataSourceChanged(object sender, EventArgs e) { if (this.winGridViewPager1.gridV 阅读全文
posted @ 2020-10-10 15:18 云辰 阅读(1196) 评论(0) 推荐(0)
摘要: 问题描述: DevExpress v11.2中的GridControl 每次运行程序的时候此控件都会自动选中第一行,是否可以实现运行时不选中任何行? 问题解答: 如果你的数据源不为空的话,XtraGrid总会有一个聚焦行。FocusedRowHandle是与CurrencyManager.Posit 阅读全文
posted @ 2020-10-09 10:14 云辰 阅读(540) 评论(0) 推荐(0)
摘要: 使用GridFormatRule 可以轻松设置GridControl中的格式化规则,这些规则的使用可以方便的控制显示,区别不同的数据格式。参见链接: FormatConditionRuleExpression Expression Operators, Functions, and Constant 阅读全文
posted @ 2020-10-09 09:58 云辰 阅读(1213) 评论(0) 推荐(0)
摘要: 场景 在Winform中一般弹出对话框使用的是MessageBox,而在 DevExpress中使用的是XtraMessageBox实现对话框。 效果 实现 首先新建确认按钮的调用方法: public DialogResult Confirm(string strString) { return D 阅读全文
posted @ 2020-09-30 12:48 云辰 阅读(1223) 评论(0) 推荐(0)
摘要: dev的XtraMessageBox控件使用起来很美观,但默认显示确定的是英文,如下图: 通过下面代码可使“OK”显示为中文:首先创建一个继承自Localizer的类: using DevExpress.XtraEditors.Controls; public class MessboxClass 阅读全文
posted @ 2020-09-30 11:46 云辰 阅读(246) 评论(0) 推荐(0)
摘要: //方法1SaveFileDialog fileDialog = new SaveFileDialog(); fileDialog.Title = "导出Excel"; fileDialog.Filter = "Excel文件(*.xls)|*.xls"; DialogResult dialogRe 阅读全文
posted @ 2020-09-30 11:43 云辰 阅读(287) 评论(0) 推荐(0)
摘要: 1 //显示行号 2 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) 3 { 4 e.Appe 阅读全文
posted @ 2020-09-30 11:39 云辰 阅读(322) 评论(0) 推荐(0)
摘要: 1.配置信息 [assembly: log4net.Config.XmlConfigurator(Watch = true)] 或者 [assembly: log4net.Config.XmlConfigurator(ConfigFile = @"log4net.config", Watch = t 阅读全文
posted @ 2020-09-30 10:33 云辰 阅读(352) 评论(0) 推荐(0)