Last post Jan 05, 2012 12:32 AM by kaiclassic
Dec 29, 2011 05:32 AM|kaiclassic|LINK
I have two UI elements. One is a ListView. Another is a button at the bottom. The ListView has more items than it can display. The vertical scroll bar is there to help user to look at items at the bottom.
Now say the user has selected the second last item at the bottom. He clicks on the button to perform certain actions. One done, the screen is redrawn. As the screen is refreshed, the ListView is rebuilt. So even with the selected item has the Focus and Selected
properties set. The ListView presents the top part but not the bottom part. (If I scroll to the bottom, I can see that particular item is selected.)
Question is how can I have the bottom part to show? I want the selected item to be shown.
Dec 29, 2011 02:17 PM|robwscott|LINK
this is for a grid, but i'm assuming that the same can be done to your listview as well
Dec 30, 2011 12:44 AM|kaiclassic|LINK
Actually find the solution. It is the EnsureVisible method.
Dec 30, 2011 12:54 AM|mbanavige|LINK
EnsureVisible is not available for the system.web ListView control as that's only for the winforms version of the control
Jan 05, 2012 12:32 AM|kaiclassic|LINK
Yes I want to ask about the situation in WinForm. Originally I post this thread to the vb.net forum in this site, but it is moved to here. Sorry about the confusion created.