标签:mask play from exp .com nta hand ted object
官方帮助地址:
https://documentation.devexpress.com/WindowsForms/583/Controls-and-Libraries/Editors-and-Simple-Controls/Simple-Editors/Concepts/Masks/Mask-Editors-Overview
代码实例:
RepositoryItemTextEdit repositoryItemTextEdit1 = new RepositoryItemTextEdit(); repositoryItemTextEdit1.Mask.EditMask = "\\d{0,}\\.[0,5]|\\d{0,}"; repositoryItemTextEdit1.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
//1、隔行换色,在fromLoad中以下代码 gridView1.Appearance.EvenRow.BackColor = Color.FromArgb(150, 254, 253, 236); gridView1.Appearance.OddRow.BackColor = Color.FromArgb(150, 240, 236, 253); gridView1.Appearance.SelectedRow.BackColor = Color.FromArgb(100, 207, 255, 220); gridView1.OptionsView.EnableAppearanceEvenRow = true; gridView1.OptionsView.EnableAppearanceOddRow = true;
//2、按条件换色 string sCol = ""; //列值 bool bColor = true; //当前色 private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { GridView View = sender as GridView; if (e.RowHandle >= 0) { string c1 = View.GetRowCellDisplayText(e.RowHandle, View.Columns["c2"]); if (c1 != sCol) { bColor = !bColor; sCol = c1; } if (bColor) { e.Appearance.BackColor = Color.Salmon; e.Appearance.BackColor2 = Color.SeaShell; } else { e.Appearance.BackColor = Color.Gold; e.Appearance.BackColor2 = Color.LightGoldenrodYellow; } } }
标签:mask play from exp .com nta hand ted object
原文地址:http://www.cnblogs.com/lhyqzx/p/7503184.html