I'm using a DataRepeater
control in my VB.Net application so I can make a custom-made list control.
I know it's main functionality is to work with dataSets
and stuff, but I don't actually want to transfer my stuff into a database because in the program's context it doesn't actually make any sense.
So my goal here is to use a dataRepeater
to list the contents of a mail inbox.
Everything works just fine until I scroll down the control. As I scroll down/up to see every item (in this case, every listed e-mail), the contents disappear and all I can see is a bunch of lines with the controls' default values assigned - like "Label1" and so on.
This is how I'm filling the dataRepeater
(abreviated):
For each m as Message in mail.Inbox
dr.Addnew()
With dr.CurrentItem
.Controls("lblFrom") = m.From
.Controls("lblSubject") = m.Subject
End With
Next
As I said, the dataRepeater
shows up perfect until I scroll it up/down, and when I do it all the data just disappears remaining only the items with the controls' default (design-time) values.
Am I missing something here? Or is it just not possible to work with a dataRepeater
to fulfil my idea?
UPDATE: Got my answer right here!