I开发者_JS百科 have a DataRepeater with some shapes on the ItemTemplate that I want to toggle on and off based on data in each Item. With every other control, I have done similar things using e.DataRepeaterItem.Controls["whatever"]
in the DrawItem event, however this doesn't work with a shape as shapes are held in a ShapeContainer within the ItemTemplate. Trying to access the shape using ShapeContainer.Shapes.get_item(int index)
results in a null reference error. As best as I can figure, the shapes in the container have not been initialized at the time of the DrawItem event.
So, what is the best way to modify a shape in an Item if I can't do it when each Item is drawn?
精彩评论