Hi
Im using wingrid and have to display hundred thousand records. So im using manual paging to display these records. We are planning to have the vertical scrollbar enabled on the wingrid which would have the minimum and maximum values assigned programatically.So Please let me know how i can find the vertical scrollbar, set these values and enable it. Please see the number of records will be set to 10 per page and i still want the scrollbars enabled.
Hi ,
Use these properties of scroll bars ,
to set the vertical scroll bar alone use this or by default it shud be automatic.. or you can set it to automatic
e.Layout.Scrollbars = Scrollbars.Vertical
To modify the appearence and other settings use the scrollbarlook
e.Layout.ScrollBarLook.
You cannot set the Minimum and Maximum on the grid's Scrollbar. These values are based on the number of rows in the grid and the grid does not have any paging functionality.
You might want to consider using LoadStyle = LoadOnDemand and using the UltraDataSource to load your data on-demand. There's a sample of this included with NetAdvantage called the Millions Rows sample.
oops, I stand corrected. Yes, you can specifiy the total number of rows without loading the rows into the grid.
In my application, I also have a virtual data source (implemented myself). In my design, setting the UltraDataSource's row count to the total number of rows caused the scroll bar to work correctly. However, it also expected all the data to be available to the UltraDataSource. As I said, I've got a virtual data source, so not all the data is available at all times. That's why it didn't work for me. But if you fully populate the data soruce, you can use Virtual Mode to load the grid with only enough rows to fill the screen's display, yet still have the scroll bar act as if all the data were loaded into the grid.
AlphaGuys said:On the other hand, Load-on-demand still uses the number of rows still uses the number of rows in the datasource to set the scrollbar's position. To get an accurate scrollbar, you'd need to load all the rows first, negating any benefit of using LoadOnDemand.
No, that's not true. If you bind the grid to an UltraDataSource component, you can specify the number of rows in the UltraDataSource without actually adding the rows.
On the other hand, Load-on-demand still uses the number of rows still uses the number of rows in the datasource to set the scrollbar's position. To get an accurate scrollbar, you'd need to load all the rows first, negating any benefit of using LoadOnDemand.
I ended up hiding Infragistics' vertical scrollbar and using a separate scrollbar control placed next to the grid, so that I could set the maxvalue and current value explicitly. This way, I can still use LoadOnDemand to load only some rows and still have a scrollbar represent the relative position in the entire data collection. (Of course, this requires me to know how many total rows I could have in the grid before they're displayed.)