Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2005, 11:02 AM
Authorized User
 
Join Date: Nov 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid scroll count (Lines) VB.NET 2003

Hi,

Is it possible to get the scroll value from a datagrid vertical scroll bar. If I scroll the side bar down by 3 lines I want to beable to retrieve the value 3 from the datagrid vertical scroll bar. I'm writing a program what utilises the datagrid but when it scrolls down it throws out the calculations. Is there a way to get the scroll value?

I have tried adding a handler but that only tells me that the scroll bar has been moved, not if it has been moved up or down

Thanks

Pete*
__________________
Simplicity is the key
 
Old November 23rd, 2005, 07:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I don't think it exposes this property. You may have to attach a <s>horizontal</s> vertical scrollbar to your form and calculate it this way.

J
 
Old November 24th, 2005, 04:49 AM
Authorized User
 
Join Date: Nov 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, I tried do do that but I just could notn think of a way to do it. Anyway It just so happens that I downloaded a copy of Visual Basic 2005 express Edition. The fully working frebie directly from microsoft earlier this month. I decided to install it on my lappers and convert my projust into it to see if that would help. It did. The new datagrid has tons of options that is not in my Visual Basic 2003, part of my Visual Studio 2003 enterprise. This includes an easy way to count rows and columns without using the dataset or datatable and datagrid.VerticalScrollingOffset which I used lastnight to calulate how far the vertical scroll has moved. You should try it out. it's fully working and free to use until Nov 6th 2006. After that it shoulf cost around $49

Thanks

Pete*
 
Old November 24th, 2005, 04:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Nice info. I have Visual Studio 2005 but have not had a chance to try it out. I am really looking forward to the new features.

From what I have seen this should be possible using a vertical scrollbar, but if it is done for you in 2005 why put in the time.

J
 
Old November 24th, 2005, 05:34 PM
Authorized User
 
Join Date: Nov 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm wondering what ur idea was for using the vertical scrollbar with a datagrid. As I said b4 I did think of it but could not think of a way to utilise it. VB.NET 2005 is really good. The only thing I don't like is that the datagridview is slow at populating. it takes about 8 seconds. A datagrid in vb.net 2003 takes about 5 seconds and a datagris in VB6 takes about 3 seconds. These figures relate to populating 36521 lines of data from a MS access DB with 7 columns. I manually program in the populate routine using a dataset not dragging & dropping in VB/ASP.

Thanks Pete*

P.S. I have just tried the free version of ASP.NET 2005, Wow it's good. I'm just about to try and convert one of my asp site. That should be funny.





Similar Threads
Thread Thread Starter Forum Replies Last Post
help, converting vb.net few lines to C# nesrine C# 3 March 6th, 2007 10:43 AM
Print Datagrid in vb.net 2003 rngrmn VB.NET 2002/2003 Basics 0 April 6th, 2006 04:23 PM
Datagrid scroll count (Lines) VB.NET 2003 peterasimpson VB How-To 1 November 24th, 2005 12:33 AM
DataGrid in VB.Net 2003 madhanagopal Pro VB.NET 2002/2003 0 August 3rd, 2004 05:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.