Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
16469 | Jul 15,2004 05:12 PM UTC | Jul 15,2004 06:04 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; if(cc.RowIndex == e.RowIndex && e.ColIndex > 0) e.Style.BackColor = Color.LightGoldenrodYellow; else if(cc.ColIndex == e.ColIndex && e.RowIndex > 0) e.Style.BackColor = Color.LightGoldenrodYellow; } private void gridControl1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; if(cc.MoveFromRowIndex != cc.MoveToRowIndex) { this.gridControl1.RefreshRange(GridRangeInfo.Row(cc.MoveToRowIndex), true); this.gridControl1.RefreshRange(GridRangeInfo.Row(cc.MoveFromRowIndex), true); } if(cc.MoveFromColIndex != cc.MoveToColIndex) { this.gridControl1.RefreshRange(GridRangeInfo.Col(cc.MoveToColIndex), true); this.gridControl1.RefreshRange(GridRangeInfo.Col(cc.MoveFromColIndex), true); } }
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.