D
David Fúnez
I have a little APP for an iPAQ that runs Ok but it does not show any
record, the problem is with the grid as shown, it has not a DATAMEMBER
Property to show the records.
So, any help will be wellcome.
**** The Code *****
Dim dsLibros As DataSet
Dim dtPrestados As DataTable
Dim xmlFile As String = "Libros.xml"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dtPrestados = New DataTable("prestados")
dtPrestados.Columns.Add("Id", GetType(Integer))
dtPrestados.Columns.Add("Titulo", GetType(String))
dtPrestados.Columns.Add("prestadosA", GetType(String))
dtPrestados.Columns.Add("Fecha", GetType(Date))
dtPrestados.Columns.Add("Devuelto", GetType(Boolean))
With dtPrestados.Columns("id")
.AutoIncrement = True
.AutoIncrementSeed = 1
End With
dsLibros = New DataSet("Libros")
dsLibros.Tables.Add(dtPrestados)
dgLibros.DataSource = dsLibros
'dgLibros.DataMember = "Prestados" ====> The problem
If File.Exists(xmlFile) Then
dsLibros.ReadXml(xmlFile)
End If
End Sub
Private Sub btnSalir_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSalir.Click
Me.Close()
End Sub
Private Sub btnSalvar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSalvar.Click
dsLibros.WriteXml(xmlFile)
End Sub
record, the problem is with the grid as shown, it has not a DATAMEMBER
Property to show the records.
So, any help will be wellcome.
**** The Code *****
Dim dsLibros As DataSet
Dim dtPrestados As DataTable
Dim xmlFile As String = "Libros.xml"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
dtPrestados = New DataTable("prestados")
dtPrestados.Columns.Add("Id", GetType(Integer))
dtPrestados.Columns.Add("Titulo", GetType(String))
dtPrestados.Columns.Add("prestadosA", GetType(String))
dtPrestados.Columns.Add("Fecha", GetType(Date))
dtPrestados.Columns.Add("Devuelto", GetType(Boolean))
With dtPrestados.Columns("id")
.AutoIncrement = True
.AutoIncrementSeed = 1
End With
dsLibros = New DataSet("Libros")
dsLibros.Tables.Add(dtPrestados)
dgLibros.DataSource = dsLibros
'dgLibros.DataMember = "Prestados" ====> The problem
If File.Exists(xmlFile) Then
dsLibros.ReadXml(xmlFile)
End If
End Sub
Private Sub btnSalir_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSalir.Click
Me.Close()
End Sub
Private Sub btnSalvar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSalvar.Click
dsLibros.WriteXml(xmlFile)
End Sub