Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

Wrong row selected when pressing down arrow key after sort

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon - 27 Jun 2007 10:16 GMT
Hi everyone,

I'm having a frustrating problem with the datagrid control.

I have added code so that the currently selected row remains highlighted
even after a sort. This seems to work perfectly in all but one respect.

After the sort, the row will move position and will remain selected. The
problem comes when I press the down arrow key. When I do this the
selected row becomes the one immediately after where the previously
selected row had been before the sort.

This has the unfortunate effect of jumping the grid to a seemingly
random place leaving the user a bit bemused.

Can anyone tell me what I need to do to avoid this problem?

Thanks

Simon
Jeff Gaines - 27 Jun 2007 10:47 GMT
On 27/06/2007 in message <upuTkvJuHHA.3476@TK2MSFTNGP02.phx.gbl> Simon
wrote:

>After the sort, the row will move position and will remain selected. The
>problem comes when I press the down arrow key. When I do this the selected
>row becomes the one immediately after where the previously selected row
>had been before the sort.

Is this because of the difference between the selected row and the focused
row? Can you set the focused row to be the same as the selected row after
the sort?

Signature

Jeff Gaines


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.