开发者

Combo Box Asp.net having unwanted behaviour

开发者 https://www.devze.com 2023-01-08 14:53 出处:网络
I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in

I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area.

In the OnLeave开发者_运维问答 event of the combobox, the selected index is set to the proper item. However, when accessing its selectedindex later it has reverted to the previous value. The selectedindex value is always one behind what it should currently be when accessed outside of the combobox.

Any help would be much appreciated.

I would be glad to provide code and further info if that would help better describe the issue.


Debug it and put a break where you set the selected index and one where you are accessing it, i would bet money it is running the acccessing code FIRST then the setting code. Post your code and we may be able to provide a solution.

0

精彩评论

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