GrapeCity.Win.MultiRow Namespace > HitTestInfo Class : CellIndex Property |
Public ReadOnly Property CellIndex As Integer
Dim instance As HitTestInfo Dim value As Integer value = instance.CellIndex
public int CellIndex {get;}
void gcMultiRow1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { HitTestInfo info = gcMultiRow1.HitTest(e.Location); if (info.Type == HitTestType.ColumnHeader) { //If right click the ColumnHeader, the clicked cell will execute auto fit. this.gcMultiRow1.ColumnHeaders[info.SectionIndex].Cells[info.CellIndex].PerformHorizontalAutoFit(); } label.Text = info.ToString(); } }
Private Sub gcMultiRow1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) Handles gcMultiRow1.MouseClick If e.Button = MouseButtons.Right Then Dim info As HitTestInfo = gcMultiRow1.HitTest(e.Location) If info.Type = HitTestType.ColumnHeader Then 'If right click the ColumnHeader, the clicked cell will execute auto fit. Me.gcMultiRow1.ColumnHeaders(info.SectionIndex).Cells(info.CellIndex).PerformHorizontalAutoFit() End If label.Text = info.ToString() End If End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2