Solved

How do I move to a certain row in a datagridview table?

Posted on 2007-11-26
2
502 Views
Last Modified: 2008-02-01
Does anyone know of a way to automatically select a certain row in a datagrid? I have a table with my collection of vintage recordings on and it would be handy for my program to scroll down the table to the last played file and select the relevant row. I have been messing about trying to code something for an hour and I can make the selected row selected, but the control doesn't scroll down (the selected row is hidden off screen and I have to manually scroll down).
0
Comment
Question by:BIGZIPZ1
2 Comments
 
LVL 18

Expert Comment

by:jcoehoorn
ID: 20352440
It's an HTML/web browser problem.  When you select the row all you've done is set a memory flag so you know what's selected and written a slightly different style for the HTML of the relevant row.  But it's still just html and your browser won't scroll down for you.  The only thing you might be able to do is include an anchor and redirect your page to the appropriate # url.
0
 
LVL 8

Accepted Solution

by:
Chumad earned 500 total points
ID: 20352442
I have yet to play with VB 2008, but in 2005, you put something like this in the ASPX page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="cprReport.aspx.cs" Inherits="cprReport" MaintainScrollPositionOnPostback="true"  %>

Note the maintainScrollPositionOnPostback = true.

good luck :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net Report Printing Issue 3 35
VB.NET (2008) - Refactoring Question 2 21
ASP/VB email question 4 35
Convert datetime to time string 10 21
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question