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
310
WebDropDown v10.3 and v11.1 postback problem
posted

Hi,

I am using the WebDropDown control v11.1, and I`ve set the following properties:

AutoFilterQueryType                                          : Contains
AutoPostBack                                                     : False
AutoPostBackFlags - SelectionChanged     : On
AutoPostBackFlags - ValueChanged            : Off
AutoSelectOnMatch                                           : False
EnableAutoFiltering                                          : Client
StyleSetName                                                    : RedPlanet
Width                                                                   : 200px

All the other properties are set to default.

This is my problem: When I select an item from the list, I can for example set a Label to the selecteditem.text value (in the WebDropDown1_SelectionChanged event handler).

But after selecting a value, (and the the postback) when I edit the value in the WebDropDown to trigger the autofiltering, then the WebDropDown immediately performs a postback (on the moment of editing the text)! and in the WebDropDown1_SelectionChanged eventhandler, I get the a NullReferenceException (object reference not set blah blah) on reading the value of the SelectedItem (cause there is no selected item, i know)...

But please tell me, why does the WebDropDown perform a postback?? This is how to reproduce it:

- Create a ASP.NET 4 WebAplication
- Drag a WebDropDown and a label on the form
- Set the properties as shown above
- In de Page_Load: add a few items to the webdropdown
- In the SelectionChanged Eventhandler of the webdropdown, set the Text property of the label to the SelectedValue.Text property of the WebDropDown
- Build and Run the app
- Select an item from the dropdown
- See how the label`s text changes
- AND NOW: edit the text in the DropDown (you should expect the autofiltering is triggered) and like you can see, the DropDown performs a postback without a selectedvalue... why why why???

please help me...? :)

thanks a lot!

Parents
No Data
Reply Children