Click here to Skip to main content
16,006,749 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVB.NET (ActiveX web browser control) Pin
gspowar15-Nov-06 17:54
gspowar15-Nov-06 17:54 
QuestionNetwork-Database Programming How to Pin
sitt15-Nov-06 17:41
sitt15-Nov-06 17:41 
AnswerRe: Network-Database Programming How to Pin
Johan Hakkesteegt17-Nov-06 6:08
Johan Hakkesteegt17-Nov-06 6:08 
QuestionListView Pin
momooomooomomo15-Nov-06 16:02
momooomooomomo15-Nov-06 16:02 
AnswerRe: ListView Pin
Christian Graus15-Nov-06 16:55
protectorChristian Graus15-Nov-06 16:55 
AnswerRe: ListView Pin
sitt15-Nov-06 17:53
sitt15-Nov-06 17:53 
AnswerRe: ListView Pin
Johan Hakkesteegt17-Nov-06 6:26
Johan Hakkesteegt17-Nov-06 6:26 
AnswerRe: ListView Pin
Daytona_67518-Nov-06 4:16
Daytona_67518-Nov-06 4:16 
Hey, another way of doing this if you don't know the amount of columns in the table you are getting would be:

<br />
Try<br />
    While dtrReader.Read()<br />
        Dim lvItem As New ListViewItem(dtrReader(0))<br />
        For i As Integer = 1 To dtrReader.FieldCount - 1<br />
            lvItem.SubItems.Add(dtrReader(i))<br />
        Next<br />
        lstViewBuyers.Items.Add(lvItem)<br />
    End While<br />
<br />
Finally<br />
    dtrReader.Close()<br />
End Try<br />


Bsically the same thing, but since the data reader has field information on it, we just use that and create the sub items from the datareader starting at the 1 position. Have you thought of using a bindable list view?

You may want to check to see if nulls are coming back though, you may get exceptions when you get data from a datareader that has null values and try to add it to a list view item like this.
AnswerRe: how to use CSV?? [urgent] Pin
Christian Graus15-Nov-06 15:45
protectorChristian Graus15-Nov-06 15:45 
General[Message Deleted] Pin
campbells15-Nov-06 16:20
campbells15-Nov-06 16:20 
GeneralRe: how to use CSV?? [urgent] Pin
Christian Graus15-Nov-06 16:47
protectorChristian Graus15-Nov-06 16:47 
GeneralRe: how to use CSV?? [urgent] Pin
ChandraRam16-Nov-06 2:00
ChandraRam16-Nov-06 2:00 
QuestionClass Pin
momooomooomomo15-Nov-06 14:37
momooomooomomo15-Nov-06 14:37 
AnswerRe: Class Pin
Christian Graus15-Nov-06 15:10
protectorChristian Graus15-Nov-06 15:10 
GeneralRe: Class Pin
momooomooomomo15-Nov-06 16:04
momooomooomomo15-Nov-06 16:04 
GeneralRe: Class Pin
Christian Graus15-Nov-06 16:46
protectorChristian Graus15-Nov-06 16:46 
GeneralRe: Class Pin
momooomooomomo15-Nov-06 19:03
momooomooomomo15-Nov-06 19:03 
QuestionWhy so hard to write to a textbox? Pin
cstrader23215-Nov-06 12:18
cstrader23215-Nov-06 12:18 
AnswerRe: Why so hard to write to a textbox? Pin
Christian Graus15-Nov-06 13:12
protectorChristian Graus15-Nov-06 13:12 
AnswerRe: Why so hard to write to a textbox? Pin
Yona Low15-Nov-06 13:15
Yona Low15-Nov-06 13:15 
GeneralRe: Why so hard to write to a textbox? Pin
cstrader23215-Nov-06 15:27
cstrader23215-Nov-06 15:27 
GeneralRe: Why so hard to write to a textbox? Pin
Yona Low16-Nov-06 3:48
Yona Low16-Nov-06 3:48 
GeneralRe: Why so hard to write to a textbox? Pin
cstrader23218-Nov-06 3:31
cstrader23218-Nov-06 3:31 
AnswerRe: Why so hard to write to a textbox? Pin
Yona Low19-Nov-06 8:07
Yona Low19-Nov-06 8:07 
Questionvb.net 2003 and Crystal Reports Pin
xtodazee15-Nov-06 10:39
xtodazee15-Nov-06 10:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.