F
Felipe Blin
Hi,
I have found a problem when I try to reload a Class with a Dataset inside .
The problem is that The dataset lost the rowstate and fools itself thinking
that all the rows are new. So when I do the update it try to reinsert new
and old rows.
Any idea?
Thank for the help
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
....
If Page.IsPostBack Then
Dim sr As System.IO.StringReader = New
System.IO.StringReader(CType(Session("Indi"), String))
Me.Indi.ReadXml(sr)
sr = New System.IO.StringReader(CType(Session("users"), String))
Me.users.ReadXml(sr)
SetGridDataSources()
Me.loadChangesInGrid()
else
...
end if
end sub
.....
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Unload
Dim sw As System.IO.StringWriter = New System.IO.StringWriter
Indi.WriteXml(sw)
Session("Indi") = sw.ToString
End Sub
Atte.
Felipe Blin
I have found a problem when I try to reload a Class with a Dataset inside .
The problem is that The dataset lost the rowstate and fools itself thinking
that all the rows are new. So when I do the update it try to reinsert new
and old rows.
Any idea?
Thank for the help
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
....
If Page.IsPostBack Then
Dim sr As System.IO.StringReader = New
System.IO.StringReader(CType(Session("Indi"), String))
Me.Indi.ReadXml(sr)
sr = New System.IO.StringReader(CType(Session("users"), String))
Me.users.ReadXml(sr)
SetGridDataSources()
Me.loadChangesInGrid()
else
...
end if
end sub
.....
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Unload
Dim sw As System.IO.StringWriter = New System.IO.StringWriter
Indi.WriteXml(sw)
Session("Indi") = sw.ToString
End Sub
Atte.
Felipe Blin