Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
26364 | Mar 22,2005 12:12 AM UTC | Oct 21,2005 02:49 PM UTC | WinForms | 4 |
![]() |
Tags: GridControl |
this.gridDataBoundGrid1.AlphaBlendSelectionColor = Color.FromArgb(0,0,0,0); this.gridDataBoundGrid1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridDataBoundGrid1_PrepareViewStyleInfo); this.gridDataBoundGrid1.Model.SelectionChanged += new GridSelectionChangedEventHandler(Model_SelectionChanged); private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { if(this.gridDataBoundGrid1.Selections.Ranges.AnyRangeContains(GridRangeInfo.Cell(e.RowIndex, e.ColIndex))) { e.Style.BackColor = Color.Red; } } private void Model_SelectionChanged(object sender, GridSelectionChangedEventArgs e) { if(e.Range != null) { this.gridDataBoundGrid1.RefreshRange(this.gridDataBoundGrid1.CurrentCell.RangeInfo, 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.