If I have a dropdownlist I know I can..
SelectedValue='<%#Bind("AgencyID")%>'
I want to do the same with a listbox but select multiple values. I was trying to use gridview.FindControl("listbox") but it always is null. Can someone guide me in the right direction? Thanks!
EDIT:
I am not sure whether I should edit someone else's question or not. But i have the same problem and need a good solution as soon as possible. I have already taken 2 days searching for a good solution for the same.
Please see my question
I have gone through some of the following links but didn't get much help and still trying to get the solution.
Links I have gone through http://www.gutgames.com/post/Using-a-ListBox-Using-SelectionMode-Multiple-with-a-GridView.aspx
http://forums.asp.net/t/1003876.aspx/1
Problem solved... I just set the selected values when the listbox is being databound.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With