Alex Rivera | Logout

Unselect all items in a listbox after initial load

Asked 2011-08-15T21:21:51.283
40

I have a ListBox that initially displays with the first item selected. I want it to display with no items selected. Is this possible?

Edit
Report

1 Answer

0

ListItem.Selected is what drives this. The default is false, which means the item will not be selected. Your code has to be explicitly setting this to true for it to be displayed as selected. You just need to remove the code that is doing that, which would look like listItem.Selected = true;. See ListItem.Selected

answered 2011-08-15T21:27:10.287

Your Answer