본문 바로가기

C#21

c# devExpress GridControl. Drawing line 데브익스프레스 윈폼 그리드컨트롤에서 그리드 선 다시 그리기. GridControl_Paint(object sender, PaintEventArgs e) { if (gridRowInfo == null) return; foreach(var gridRow in gridRowInfo) { e.Graphics.DrawLine(new Pen(Color.Gray) { DashStyle = System.Drawing.Drawing2D.DashStyle.Dot }, new Point(gridRow.Bounds.X, gridRow.Bounds.Bottom), new Point(gridRow.Bounds.Right, gridRow.Bounds.Bottom)); foreach(var cellInfo in gridDataRow.. 2023. 11. 13.
c# devExpress LookUpEditor 바인딩 윈폼. c# 윈폼에서 devExpress LookUpEditor 컨트롤 바인딩. public static void BindLookUpEdit(this LookUpEdit lue, DataTable dt , string text , string value , bool isTop = false , string allNm = "전체" ) { lue.Properties.DataSource = null; DataTable dtC = dt.Copy(); if (isTop) { DataRow dr = dtC.NewRow(); dr[value] = string.Empty; dr[text] = allNm; dtC.Rows.InsertAt(dr, 0); dtC.AcceptChanges(); } //데이터 바인딩 lue.Prope.. 2023. 11. 13.
c# oracle in 과 같은 함수. Sol 1. public static bool In(this T item, params T[] items) { if (items == null) throw new ArgumentNullException("items"); return items.Contains(item); } 1. 예) int ix= 1; if (ix.In(1, 2, 3)) string s1= "B"; if (s1.In("A", "B", "C")) Sol 2. public static bool In(object compare, params string[] sList) { for (int index = 0; index < sList.Length; ++index) { if (sList[index] == compare.ToString()) re.. 2023. 11. 13.
c# devExpress RichEditor에서 예약어 컬러링 CustomSyntaxHighlightService 출처 https://laptrinhvb.net/bai-viet/ebook-it/--DEVEXPRESS---Format-code-T-SQL-highlight-in-RichEditControl--/7c0d6f6daf733868.html using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using DevExpress.Office.Utils; using DevExpress.XtraRichEdit.API.Native; using DevExpress.XtraRichEdit.Services; using System.Linq; using System.Text.Regul.. 2023. 11. 13.
반응형