System.Windows.Forms.DataGridViewCell.OnMouseDown(System.Windows.Forms.DataGridViewCellMouseEventArgs)

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 7

1. Example

Project: Analysis-Services
Source File: TreeGridCell.cs
View license
protected 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();
				}
			}
		}

2. Example

Project: BismNormalizer
Source File: TreeGridCell.cs
View license
protected 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();
				}
			}
		}