I have GridControl (DevExpress) of form. I want to call some method when position of vertical scrollbar in the end. Is this possible? Thanks.
EDIT
My solution(not exactly solve the question, but work great for me):
void gvDisplay_TopRowChanged(object sender, EventArgs e)
{
if (gvDisplay.IsRowVisible(gvDisplay.RowCount - 1) == RowVisibleState.Visible)
{
_lastFocusedRowHandle = gvDisplay.RowCount;
LoadNextPortionOfData();
}
}
I haven’t used devexpress before but the way in going about handling this should still be the same or similar regardless as you will still need to create your own extended event. The following is what would be done for the default windows forms, if devexpress extends on this then there should be no problem.
Handling this would be done by an event being triggered. The component class you are using should have a Scroll event, this event is called when the position of the scroll bar changes. If you create a new component class and have it inherit from the component class you want you can then add features that you want. In this new component class you need to extend the event Scroll to check the Value property of the scrollbar. When using this new component class it will still have all the functionality that the original had but now with the new features you added.
For more reading:
Scrollbar class
http://msdn.microsoft.com/en-us/library/t2htecew.aspx
Scrollbar Scroll event
http://msdn.microsoft.com/en-us/library/system.windows.forms.scrollbar.scroll.aspx