开发者

Using same control in both itemtemplate and edititemtemplate in listview

开发者 https://www.devze.com 2023-01-10 00:14 出处:网络
I have a开发者_StackOverflow社区 listview where each row contains usercontrol. Usercontrol data remain same for both EditItemTemplate and ItemTemplate mode. Rather that instanciating the same usercont

I have a开发者_StackOverflow社区 listview where each row contains usercontrol. Usercontrol data remain same for both EditItemTemplate and ItemTemplate mode. Rather that instanciating the same usercontrol twice for both edit and item mode, is there anyway i can use the itemTemplate usercontrol instance in edititemtemplate?


When a row enters edit mode, it does not render the item template,so there isn't a duplicate rendering... so you only have to worry about one instance for that row anyway.

HTH.

0

精彩评论

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

关注公众号