DataRepeater, changing control properties

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
 
H

Huggyboy101

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top