Hello,
I'm using an UltraGrid to display information in an Excel format. The column headers are dates that go for a couple months ahead. Since there are so many dates, you have to use the WinGrid's scrollbar to scroll and see them all.
I am wondering how I can programmatically force a certain cell to be the start of what is showing on the screen. (For example, I have a calendar control, you select a date, and it automatically scrolls the WinGrid so the date you selected is the first visible column in the list.
I've been reading for a while and haven't located anything. Any help will be appreciated!
Thanks!
There is a ScrollCellIntoView on both the RowScrollRegion and ColScrollRegions of the grid that you can use. You could do something like:
this.ultraGrid1.ActiveRowScrollRegion.ScrollCellIntoView(cell, this.ultraGrid1.ActiveColScrollRegion);
-Matt
That is awesome! That works perfectly, thank you so much!
One more question now arises, is there a way to make it so when scrolling it will scroll an entire column at a time? I just implemented your suggestion, and it scrolls the cell into view, but depending on where you were in your scrolling, the cell may be cut off some. (for instance, instead of seeing "05/10/09" in full view, you'll see half of the 0 and then 5/10/09. If I could make it so it forces you when you scroll to make the entire column fit in view, that'd be awesome!
Again thanks a lot for the response I've been pulling out my hair!