Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
17332 | Aug 5,2004 08:44 PM UTC | Aug 5,2004 10:17 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
public class MyGridControl : GridControl { protected override bool ProcessDialogKey(Keys key) { if ( (key & Keys.KeyCode) == Keys.Space && Control.ModifierKeys == Keys.Shift ) { Selections.Clear(); Selections.SelectRange(GridRangeInfo.Row(this.CurrentCell.RowIndex), true); return true; } else return base.ProcessDialogKey (key); } protected override void OnCurrentCellMoved(GridCurrentCellMovedEventArgs e) { if(this.CurrentCell.MoveFromRowIndex != this.CurrentCell.MoveToRowIndex) { GridRangeInfo oldRange = GridRangeInfo.Row(this.CurrentCell.MoveFromRowIndex); if(Selections.Ranges.ActiveRange.Equals(oldRange)) { Selections.Clear(); Selections.SelectRange(GridRangeInfo.Row(this.CurrentCell.MoveToRowIndex), true); } } base.OnCurrentCellMoved (e); } }
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.