|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Aug 2000
Messaggi: 1209
|
[VB] Popolare una ListView con un DataSet..........
Per popolare una "ListView" ho usato sempre un Ciclo:
While ---> End While Ma non posso usare un DataSet ??? Se si mi postate un esempio di codice ??? |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jan 2000
Città: Provincia di Parma
Messaggi: 724
|
Vado a memoria...
Supponendo che tu abbia il DataSet già creato di nome "DataSet1", e una ListView di nome "ListView1": ListView1.DataSource = DataSet1 ListView1.DataBind()
__________________
My Pc: Case Enermax Chakra - PSU Corsair HX520 - Gigabyte P35-DS3R - Core2 Duo E6550 - 6 Gb RAM Geil PC800 - 2x WD Caviar SE 320Gb (Raid1) - Xfx GeForce 8600Gt - Master Pioneer DVR111D - Samsung SM T220 - S.O. Windows 7 Ultimate x64 SP1 My blog: http://blogs.ugidotnet.org/alby |
|
|
|
|
|
#3 | |
|
Senior Member
Iscritto dal: Aug 2000
Messaggi: 1209
|
Quote:
scusa se ritiro fuori questo ma mi serve nuovamente, -------------------------------------------------------------------------- Dim da As New SqlDataAdapter() oConn.Open() Dim oComm As New SqlCommand("SELECT * FROM Anagrafica", oConn) oComm.CommandType = CommandType.Text da.SelectCommand = oComm ds = New DataSet("Anagrafica") da.Fill(ds) oConn.Close() ListView1.DataSource = ds ListView1.DataBind() ------------------------------------------------------------------------------- mi dice: "DataSource" non e' un membro di "System.Windows.Forms.Listview" e "DataBind" non e' un membro di "System.Windows.Forms.Listview" ma allora non posso popolare con un Dataset ??? |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 09:05.



















