Can preselect databound listbox items
I'm binding in a list of search options from my database, the listbox is
filled correctly, but I want all the items to be pre-selected. Doing the
following doesn't seem to work.
productTypeList.DataSource = new DataView(tempTable);
productTypeList.DataTextField = "productTypeName";
productTypeList.DataValueField = "productType";
foreach(ListItem li in productTypeList.Items)
li.Selected = true;
Am I missing something to update the control?
|All times are GMT. The time now is 11:28 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.