开发者

Combining bubbled events into a single event

EDIT: I finally figured it out. It's quite a lot of code, so check out the zip!!

I have a control, with multiple controls, which contain multiple checkboxes. See picture

When pressing "Submit" I'd like, if any checkboxes have changed, to fire an event containing two Lists - one containing the checkboxes which check-mark were removed and one containing the checkboxes that's been checked.

Hooking up on the CheckedChanged-event is no problem and currently I 开发者_如何学Gojust add the checkboxes to the added/removed lists in their container, but when can I fire the event in the container with the populated lists?


I found out how to combine the events.

This also gives you the functionality to see exactly what have been selected and what have been removed since last postback in a CheckBoxList (well, it's not really a CheckBoxList, but it works pretty much the same way).

Download the code here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜