DataRepeater, changing control properties

  • Thread starter Thread starter William Stacey
  • Start date Start date
W

William Stacey

1) I can change things like "e.DataRepeaterItem.BackColor" in the DrawItem
event, but can't change things like button visibility. When you change
visible, you get random results on what is visible and what is not. Where
do you hook in to do things like that.

2) What is the pattern for using different templates in the ItemTemplate.
Say you want different controls displayed depending on the data?

tia
 
Had the same problems as you - with virtualmode set to true and handling the
itemvalueneeded event noticed that no event is generated if the item is a
button - presumably a button is not regarded as a valid object for a dataitem.

Replacing the button with a hyperlink gets over this (a itemvalueneeded
event is generated) but setting the enabled to false doesnt work on the last
'page' of a long list - however scrolling up and down sorts out the screen
display.

I had thoughts that setting the datarepeater to the top of the list might
solve the problem but i havent discovered how to do that.

If anyone has a work around / fix for this i would be very grateful.
 
Back
Top