DropdownLists problems
-
Hi !! I'm working with Dropdownlists in C# which are binded by two columns from a dataset. I have two little questions so I guess anyone could help me with them... 1. I want to sort the Dropdownlist, is there any easy method to do it without using a "traditional" sort method 2. I have a problem when i try to select another value which is not the first in binding... I've tried to change selectedvalue, selectedindex and selecteditem but it doesn't change... any suggestions Thank you very much
-
Hi !! I'm working with Dropdownlists in C# which are binded by two columns from a dataset. I have two little questions so I guess anyone could help me with them... 1. I want to sort the Dropdownlist, is there any easy method to do it without using a "traditional" sort method 2. I have a problem when i try to select another value which is not the first in binding... I've tried to change selectedvalue, selectedindex and selecteditem but it doesn't change... any suggestions Thank you very much
Deiuwe wrote: 1. I want to sort the Dropdownlist, is there any easy method to do it without using a "traditional" sort method What do you mean by "traditional" sort method? Deiuwe wrote: 2. I have a problem when i try to select another value which is not the first in binding... I've tried to change selectedvalue, selectedindex and selecteditem but it doesn't change... any suggestions I don't understand the question. You mean the value you're selection is not part of the first list? ~Javier Lozano
-
Hi !! I'm working with Dropdownlists in C# which are binded by two columns from a dataset. I have two little questions so I guess anyone could help me with them... 1. I want to sort the Dropdownlist, is there any easy method to do it without using a "traditional" sort method 2. I have a problem when i try to select another value which is not the first in binding... I've tried to change selectedvalue, selectedindex and selecteditem but it doesn't change... any suggestions Thank you very much
1) I want to sort the Dropdownlist, is there any easy method to do it without using a "traditional" sort method Use arraylist for this copy all the items of the dropdownlist to arraylist and do the sorting and then bind it back to the dropdown list 2) I have a problem when i try to select another value which is not the first in binding... I've tried to change selectedvalue, selectedindex and selecteditem but it doesn't change... any suggestions I think use page.ispostback option in the page load event may be this could solve your problem