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!
Hi Mike,
Yes that was the problem, I was calling on InitializeLayout. once I moved the calling function from InitializeLayout to after binding the gird. its works. Thanks a ton.
I think we got the problem. You raised a valid point. I am calling on InitilizeLayout event of grid, I feel I need to call it once the grid bind completely. right now I am out of office, I will do it on Monday, I feel we got the issue it is due to grid not yet ready to set scroll column region. I will update on Monday. Thanks Mike for quick reply.
Hi,
Is the grid visible at the time you are calling ScrollColIntoView? In what event are you calling the method?
Something in your application must be interfering or trying to scroll at the same time you are calling ScrollColIntoView, but I can't really guess what this is, since I don't know anything about your application. The fact that the grid is in a tab control shouldn't make any difference, unless maybe the tab is not currently active and so the grid is not visible.
Hi Matt, on my windows form I have two tab. both tab have different different UltraGrid and no link in between. for one grid I am using ScrollColIntoView to set the scroll view for one column. I want that column to align left in scroll region. but its not working when I am passing true for leftalign parameter grid scroll region going mad and it showing scroll from very first column of grid and for false its working some how column is showing in scroll region but in middle. any idea what is happening and why leftalign true is not working?
Zomg, JACKPOT!
This is exactly what I was looking for. Thank you so much Matt, I really appreciate the responses. You guys really rock, great support it's unbelievable.
Thanks again,
Shul