|
-
April 25th, 2007, 01:45 AM
#1
window form's combo box
I am using the combobox in a window form and datasource property of that is the arraylist.
Now when the arraylist changes the combobox shows the new arraylist items in the dropdown but the selected item is that of the previous one.
i use the datasource property set to null before binding it and also tryed the refresh() and the invalidate() but these are not working.
the code are as:
Combobox1.datasource=null;
Combobox1.datasource=arraylist1;
can anyone help me.
Thnx in advance.
-
April 25th, 2007, 01:55 AM
#2
Re: window form's combo box
please show how you change the arrayList
Daniela
******
I would love to change the world, but they won't give me the source code
-
April 25th, 2007, 02:33 AM
#3
Re: window form's combo box
the arraylist are the variable and the arraylist are fill by the xml file which is declare in another class on the values of the xml the arrayliast are fill.
-
April 25th, 2007, 03:09 AM
#4
Re: window form's combo box
reset the selectedindex property to -1 before changing the datasource, this way the previously selected item will not be shown
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|