Syncfusion.Grid.Windows
Example 


Scroll position.
Column index.
Pixel delta.

HScrollPixelPosToColIndex Method

Gets the column and the pixel delta to the scroll position of the column for a specified scroll position.
Syntax
'Declaration
 
Public Overridable Sub HScrollPixelPosToColIndex( _
   ByVal pixelPos As Integer, _
   ByRef colIndex As Integer, _
   ByRef pixelDelta As Integer _
) 
'Usage
 
Dim instance As GridControlBase
Dim pixelPos As Integer
Dim colIndex As Integer
Dim pixelDelta As Integer
 
instance.HScrollPixelPosToColIndex(pixelPos, colIndex, pixelDelta)
public virtual void HScrollPixelPosToColIndex( 
   int pixelPos,
   out int colIndex,
   out int pixelDelta
)

Parameters

pixelPos
Scroll position.
colIndex
Column index.
pixelDelta
Pixel delta.
Example
This example shows how to get the column index to the scroll position of the column for a specified scroll position.
int colIndex, pixelDelta;
int hScrollPixelPos = gridControl1.GetCurrentHScrollPixelPos();
this.gridControl1.HScrollPixelPosToColIndex(hScrollPixelPos, out colIndex, out pixelDelta);
Console.WriteLine("Column index:" + colIndex);
Dim colIndex, pixelDelta As Integer
Dim hScrollPixelPos As Integer = gridControl1.GetCurrentHScrollPixelPos()
Me.gridControl1.HScrollPixelPosToColIndex(hScrollPixelPos,colIndex,pixelDelta)
Console.WriteLine("Column index:" & pixelDelta)
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.14

See Also