I have a DataBoundGrid with 40 rows. When the user scrolls down the numbers of rows has to increase.
For which i have overrided the onVScroll method of the grid. In which i have added a new row to the datasource and have called refreshRange(lastrow).
A similar thing has been done by overriding the onKeyDown and incase of down arrow the number of rows increases.
In case of the keydown event the refresh is smooth but incase of Vscroll the grid does not scroll to the new row. Is there any way i can improve the refresh incase of Vscroll without using the Refresh method (this method helps in scolling to the new row but is not as smooth as in when done with the down arrow which only calls the refreshrange method)
ADAdministrator Syncfusion Team April 7, 2005 08:26 AM
Try adding the new rows in the TopRowChanging (or maybe TopRowChanged???) event. You can use the grid.ViewLayout.LastVisibleRow to get the last row displayed, and if it is close to your limit, then add your new rows to the datasource. The TopRowChanged event should be raised whether the user uses the keyboard or the scrollbar to scroll the grid.
VIVinayApril 7, 2005 10:27 AM
Thanks for the help. I have been able to increase the rows using the TopRowChnaged Event, but the when using the scrollbar the rows are inserted but the scrollbar does not scroll to the last row.
ADAdministrator Syncfusion Team April 7, 2005 10:37 AM
After inserting new rows, try calling grid.ResetVolatileData followed by grid.UpdateScrollBars. Or, you can try calling grid.Update which will do these calls plus some others as well.