Home - Forums-.NET - FlyGrid.Net (Windows Forms) - HScroll position

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

HScroll position
Link Posted: 08-Nov-2006 06:04
There is an HScroll event in flygrid.  

How could I get the scroll position in pixel within that event?  

Thanks in advance.
Link Posted: 08-Nov-2006 09:26
The nearest update will contain following methods:
FlyGridViewPort.GetVertScrollOffset and FlyGridViewPort.GetHorzScrollOffset, you'll can use GetHorzScrollOffset method in HScroll event as following:
[c#]
private void InitFlyGrid(FlyGrid flyGrid)
{
  //....
  //connect to HScroll event handler
  flyGrid.HScroll += new NineRays.Windows.Forms.FlyGrid.NotifyEventHandler(OnHScroll);
}

private void OnHScroll(object sender)
{
  FlyGridViewPort port = sender as FlyGridViewPort;
  if (port != null)
  {
    int hposition = port.GetHorzScrollOffset();
    //...
  }
}