开发者

How can I modify shapes on each item in a DataRepeater?

开发者 https://www.devze.com 2023-04-07 04:52 出处:网络
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.DataRe

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消