Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2265
WebDataTree and WebDropDown raise events already been raised with UpdatePanel
posted

Hi All,

I've got a problem with events getting fired on WebDropDown and WebDataTree when they are used in an UpdatePanel.  Without UpdatePanels, everything seems fine.

I have a WebDropDown on a page.  The WebDropDown is sat in an UpdatePanel - UpdatePanel1.
I also have a WebDataTree.  The WebDataTree is also sat in an UpdatePanel - UpdatePanel2.

I am handling the WebDropDown_SelectionChanged event.  I am also handling the WebDataTree_CheckBoxSelectionChanged event.

When the page is first displayed, my WebDropDown gets bound to a DataTable.  The WebDataTree is set at design time.

I am doing the following in the page:

Run 1

1. Check a node in the WebDataTree.  It raises the CheckBoxSelectionChanged event back to the server.
2. Change the WebDropDown selected value.  The SelectionChanged event is raised followed by the CheckBoxSelectionChanged event - but I did not even check anything!!!!

Run 2

1. Change the WebDropDown selected value.  The SelectionChanged event is raised (no CheckBoxSelectionChanged is raised).
2. Check a node in the WebDataTree.  It raises the CheckBoxSelectionChanged event back to the server.  The SelectionChanged event is raised also!!!!!!

Both the UpdatePanels properties are set as:
ChildrenAsTriggers = False
UpdateMode = Conditional

WebDropDown properties are set as:
AutoPostBackFlags
   SelectionChanged = On
   ValueChanged = Off

DisplayMode = DropDownList
EnableAutoComplete = False
EnableAutoFiltering = Server
EnableDropDownAsChild = True
EnableLoadOnDemand = True
MultipleSelectionType = Checkbox

WebDataTree properties are set as:
AutoPostBackFlags
   CheckBoxSelection = On

CheckboxMode = BiState
EnableAjax = True
EnableConnectorLine = True
SelectionType = Single

I've attached a sample application.

Am I doing something wrong or is this a problem??  Any ideas?

Andez

WebDropDownFireTwice.aspx.zip