반응형 row color3 WPF & DevExpress GridControl RowColor #2 dynamic 이전과 다르게 source data의 값을 활용하여, row color을 변경하였다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigatio.. 2021. 3. 30. WPF & DevExpress GridControl RowColor #1 Basic devexpress의 레퍼런스 참고해서 컬러를 넣을 때... 완전 비효율이다. Winform의 RowStyle처럼 바꾸면 좋은데.. 그렇지 못하다. T T using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media... 2021. 3. 30. Devexpress Grid 행에 색상 넣기 데이터 값에 따라 행별로 색상을 달리 할경우 RowStyle 이벤트를 사용한다. Devexpress 샘플 코드 private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { GridView View = sender as GridView; if(e.RowHandle >= 0) { string category = View.GetRowCellDisplayText(e.RowHandle, View.Columns["Category"]); if(category == "Beverages") { e.Appearance.BackColor = Color.Salmon; e.Appearance.BackColor.. 2016. 5. 3. 이전 1 다음 반응형