Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
24620 | Feb 8,2005 03:22 PM UTC | Feb 8,2005 09:27 PM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
this.grid.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;
this.gridDataBoundGrid1.GridControlMouseDown += new Syncfusion.Windows.Forms.CancelMouseEventHandler(gridDataBoundGrid1_GridControlMouseDown);
private void gridDataBoundGrid1_GridControlMouseDown(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e)
{
int row, col;
GridControlBase grid = (GridControlBase) sender;
if (grid.PointToRowCol(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y), out row, out col))
{
if (grid.Model.SelectedRanges.GetRangesIntersecting(GridRangeInfo.Row(row)).Count > 0)
{
grid.Model.Selections.SelectRange(GridRangeInfo.Row(row), false);
grid.Model.InvalidateRange(GridRangeInfo.Row(row), GridRangeOptions.None);
e.Cancel = true;
}
}
}
Stefan
>Fantastic!
>
>Ok, here''s one final question. While having multiple rows selected, how do I get the ctrl click to REMOVE a row from the selection (another Windows standard)?
>
>Rick 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.