Here are the examples of the csharp api class System.Windows.Forms.DataGridViewCell.OnMouseDown(System.Windows.Forms.DataGridViewCellMouseEventArgs) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
View licenseprotected override void OnMouseDown(DataGridViewCellMouseEventArgs e) { if (e.Location.X > this.InheritedStyle.Padding.Left) { base.OnMouseDown(e); } else { // Expand the node //TO_DO: Calculate more precise location TreeGridNode node = this.OwningNode; if (node != null) { node._grid._inExpandCollapseMouseCapture = true; if (node.IsExpanded) node.Collapse(); else node.Expand(); } } }
0
2. Example
View licenseprotected override void OnMouseDown(DataGridViewCellMouseEventArgs e) { if (e.Location.X > this.InheritedStyle.Padding.Left) { base.OnMouseDown(e); } else { // Expand the node //TO_DO: Calculate more precise location TreeGridNode node = this.OwningNode; if (node != null) { node._grid._inExpandCollapseMouseCapture = true; if (node.IsExpanded) node.Collapse(); else node.Expand(); } } }