DataRepeaters in virtualmode

  • Thread starter Thread starter Huggyboy101
  • Start date Start date
H

Huggyboy101

I have been trying to use datarepeaters in virtualmode for displaying lots of
data and have come across some 'interesting features'

1) no ItemValueNeeded event is generated if the control in the template is a
button

2) in the ItemValueNeeded event if a e.Control.Enabled = False (or indeed
true) is done on a textbox the results are pretty random, changing when you
scroll up and down the data but e.Control.visible= False (or true) works
fine.
The pretty shoddy workaround i am about to do to get my application working
is to have a label & a textbox with the same data in them and making the
label visible & textbox invisible when i dont want any input & the other way
around when i do

3) (... and this is the really irritating one) there is an example in the
datarepeater member class documentation for itemdraw event (pasted below)
that changes the colour on every other item which works fine with less than a
page but on multipages seems to work randomly (mostly blue it seems)
Private Sub DataRepeater1_DrawItem(ByVal sender As System.Object, ByVal
e As Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs) Handles
DataRepeater1.DrawItem
If (e.DataRepeaterItem.ItemIndex Mod 2) <> 0 Then
' Apply the secondary back color.
e.DataRepeaterItem.BackColor = Color.AliceBlue
Else
' Apply the default back color.
DataRepeater1.ItemTemplate.BackColor = Color.White
End If
End Sub

4) On the bright side - all the data is being handled correctly which
suggests it isnt my ItemValueNeeded code that is at fault

Looking on the internet has proved pretty fruitless - i have only found 1
person who has found the same problems (William Stacey in this discussion
group) and nobody has responded (except for me)
I thought the whole idea of datarepeaters/virtualmode is to handle lots of
pages of data more flexibly & efficiently - any ideas of workarounds or a
different control i can use?

Thanks in anticipation
 
Back
Top