By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

reading and setting location for horizontal srcoll bar

P: n/a
is there a way to control (get and set) the position of a Datagrid's,
horizontal scrollbar?

I am linking the datagrid to a very large table (hundreds of thousands of
i cannot connect it to all the data at once since it would require lots and
lots of memory.
so i break up the table into sections, and i refresh the data as the user
scroll to provide the next section.
but when grid is refreshed the horizontal scrollbar losses its position.

Thanks in advance for you help.
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
You need to create your own DataGrid class to inherit from the
DataGrid. This way you can access GridHScrolled and GridVScrolled
methods which are protected otherwise. Using those two methods will
let you scroll vertically or horizontally

(Me refers to the new datagrid class object that I created)
Me.GridHScrolled(Me, New
ScrollEventArgs(ScrollEventType.LargeIncrement, intNewPos))

To get the positions:




Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.