473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how do i read more than 7 records from a datagrid??

like, while using SqlDataReader.read() it can only get 7 rows of a gridview.

I want to access more than 7 rows lets say 11.

heres the code i have been so far

While (reader.Read())
Dim s() As String = _
{reader.GetValue(0).ToString, _
reader.GetValue(1).ToString, _
reader.GetValue(2).ToString, _
reader.GetValue(3).ToString, _
reader.GetValue(4).ToString, _
reader.GetValue(5).ToString, _
reader.GetValue(6).ToString}

Dim item As New ListViewItem(s)
ListView1.Items.Add(item)


End While
Jan 17 '10 #1
2 1163
You can loop through each row object in the grid and save the column that you need. Here's an example


Dim dgRow As DataGridViewRow

For each dgRow In DataGridView1.Rows
ListView1.Items.Add(dgRow.Cells.Item(2).Value.ToSt ring())
Next

This adds the 3rd column (Item(2)) of the row to the ListView, and continues for every row in the DataGrid. You can change the loop, depending on how many you need, etc.
Jan 20 '10 #2
can anyone gimme the pgm for"how to read a .wav file in c++"??
Jan 21 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ioannis Demetriades | last post by:
Hi, I am doing a VB.NET application with SQL Server 2000 and I need to implement a database search facility that will normally return lots of records. Those records will then be displayed in a...
2
by: Tom | last post by:
Hi, I have been through all kinds of documentation on the datagrid and dataviews. I have many expensive books that I have looked through. But nothing has really helped. I want to find out and...
1
by: Marco Martin | last post by:
Hi everyone, I've got a dataset with a records table that is built up from scratch according to user input. I'm saving this dataset as xml by using...
9
by: VMI | last post by:
We have this huge application that's based on storing tons of data on a dataTable. The only problem we're having is that storing LOTS of data (1 million records) into a datatable will slow down the...
1
by: Charlie Dison | last post by:
I am using a datagrid bound to a Dataset. The problem is when the dataset has fewer records than the page size for the height, the cells grow automatically. Thus the datagrid with one record grows...
3
by: suresh | last post by:
frenz, i need to disable the add new record mode in datarid. i just want to modify the existing records in the grid...but i dont want to add new records..how do i do that? -suresh
4
by: karunakar rao | last post by:
Hi All I need some help. I have been populated 50,000 Records in asp.net C# datagrid. Ever page has 10 records Example "<< Prev 1 2 3 4 5 6 7 8 9 10 Next>> Iam showing like that in my...
2
by: dbuchanan | last post by:
Hello, I am using Win forms VB 2003 The form design requires the newest records appear at the top of the DataGrid. I load my form with a stored procedure that orders the records with the...
5
by: antonyliu2002 | last post by:
I want to put results from more than 1 sql queries into a signle datagrid, For example, in my web application, I submit this following query to my oracle database: Select NetID, Firstname,...
1
by: syedrafey | last post by:
Hello, One of datagrid on my aspx page is not showing records on production server while there are records in database table. I have tested that page on my local machine and it is working fine....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.