Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-11-26
2
Medium Priority
?
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Expert Comment

by:Joel Coehoorn
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

618 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