drop down loses value

I have ported an app from vb.net03 to vb.net 05 for windows mobile 5. 1 issue that I haven't figured out is when you choose a value in a drop down the Text stays highlighted. The problem is if you go to the next form after choosing the value, that value is lost. I have tried changing the focus on the page to another control in the selectindexchanged function but the value goes back to null in the drop down control. Anybody else have this problem

Answer this question

drop down loses value

  • Tammt

    Can you try this on device emulator

    Manav



  • rwerner

    After saving or cancelling the actions of the 2nd form you return to the first form. The first form has several controls (drop down lists, textboxes, etc.), the only value that is lost is the highlighted value in the last drop down list chosen. If you tap on another control after choosing this value before going to the 2nd form, the information stays in the control.
  • DotNet_Student

    Looks like you're reinitializing the control or not storing the selected value. Please verify.

    Manav



  • Mark Shvarts

    Do you mean to say that a) You select a value from drop-down list box b) you now goto a new form c) Are you accessing this value in the new form or d) You're going back to the 1st form and seeing null value - If this is the case than you're probably reinitializing the listbox control in a form load event.

    Manav



  • Krutika

    Are you seeing this problem when you're running the program in the device emulator or the actual device You may want to run the application for Compact Framework 1.0 instead of 2.0 - Try creating PPC 2003 app.

    Manav



  • a_guj

    I am not saving any of the information on the page yet (the controls and the form stay in existence while the user is on the 2nd page), not until the user saves or cancels the actions of the 2nd page which brings the user back to the first page with the information stored from the 2nd page into a container on the first page. At this point one of the options a user has is to save all of the information and exit.

    The problem is that if you select a value in a combobox, the value in the control stays highlighted unless you tap on another control and bring the focus to it. If you don't change the focus of the controls and move to the next page, the value in that combobox is lost. This problem didn't exist in vb.net 2003 and I haven't been able to progammatically change the focus without losing the chosen value in the combobox. I could save the value in a string, but since this wasn't necessary in 2003, I was trying not to do it now.

    Thanks for helping with this.


  • ckob22

    The app is running on the device, a Dell Axim x51 which is a Windows Mobile 5.0 device. The app worked fine on the earlier ppc 2003
  • drop down loses value