Syncfusion.Grid.Windows
Example 


Column index.

ColIndexToHScrollPixelPos Method

Gets the scroll position for pixel scrolling for a column.
Syntax
'Declaration
 
Public Overridable Function ColIndexToHScrollPixelPos( _
   ByVal colIndex As Integer _
) As Integer
'Usage
 
Dim instance As GridControlBase
Dim colIndex As Integer
Dim value As Integer
 
value = instance.ColIndexToHScrollPixelPos(colIndex)
public virtual int ColIndexToHScrollPixelPos( 
   int colIndex
)

Parameters

colIndex
Column index.

Return Value

Horizontal scroll position in pixel.
Example
This example shows how to get the scroll position based on corresponding column.
//Scroll position based on the column index.
void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
    int pixel = this.gridControl1.ColIndexToHScrollPixelPos(e.ColIndex);
    Console.WriteLine("Scroll position:" + pixel);
}
'Scroll position based on the column index.
Private Sub gridControl1_CellClick(ByVal sender As Object, ByVal e As GridCellClickEventArgs)
   Dim pixel As Integer = Me.gridControl1.ColIndexToHScrollPixelPos(e.ColIndex)
   Console.WriteLine("Scroll position:" & pixel)
End Sub
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.14

See Also