Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
17416 | Aug 9,2004 01:15 AM UTC | Aug 9,2004 06:11 AM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
private void gridControl1_SelectionChanging(object sender, GridSelectionChangingEventArgs e) { if(e.Reason == GridSelectionReason.SetCurrentCell && Control.MouseButtons == MouseButtons.Left) { int row, col; Point pt = this.gridControl1.PointToClient(Control.MousePosition); if(this.gridControl1.PointToRowCol(pt, out row, out col, -1) && col == 1) { TreeCellRenderer cr = this.gridControl1.GetCellRenderer(row, col) as TreeCellRenderer; Rectangle rect = cr.GetCellBoundsCore(row, col); int X = 20 + rect.X + cr.IndentSize * (int)this.gridControl1[row, col].Tag; if( pt.X < X) e.Cancel = 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.