TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
King Umar
NA
103
29.9k
how retrieve data from from database into a listview?
Sep 1 2015 9:21 PM
how to retrieve data from microsoft sql server 2013 into listview in vb.net(visual studio2013),i already have the codes that retrieve automatic ( by array ) but my project require me to need codes that have to customize this process,
For i = 0 To ds.Tables(0).Rows.Count - 1
For j = 0 To ds.Tables(0).Columns.Count - 1
itemcoll(j) = ds.Tables(0).Rows(i)(j).ToString()
Next
Dim bb As New ListViewItem(itemcoll)
Me.ListView1.Items.Add(bb)
Next
this is the codes for the array retrieve but my project require me to need a manual ( customize )
it would look something like..
For i = 0 To ds.Tables(0).Rows.Count - 1
ListView1.View = ds.Tables("AddItem").Rows(0)("Serial_Number").ToString
ListView1.View = ds.Tables("AddItem").Rows(0)("PO_Number").ToString
ListView1.View = ds.Tables("AddItem").Rows(0)("Vendor").ToString
ListView1.View = ds.Tables("AddItem").Rows(0)("Category").ToString
ListView1.View = ds.Tables("AddItem").Rows(0)("DO_Date").ToString
Next
correct me if i'm wrong..can anyone help...anyone got any idea
Reply
Answers (
1
)
Controll input from barcode
How to create xml document as a property in c#.net