Loading ListBox Data on Load

  • Thread starter Thread starter Amy Snyder
  • Start date Start date
A

Amy Snyder

Below is my code when loading my page. Is there a way to perform
conditions based on another field when loading? I want all items that
have a field name of level=2 indented a few spaces.

With lstIndustry
.DataValueField = "code"
.DataTextField = "desc"
.DataSource = GetDataSet("s_select_my_sp")
.DataBind()
End With

Thanks
 
I don't believe so, and still be able to use the DataSource property.

You can do many things to accomplish this though. How about writing a
function to loop through all the rows of the dataset, and make calls to
lstIndustry.Items.Add(new
ListItem(functionToReturnWhatIWant(<dataset_textfield>, <dataset_level>),
<dataset_value>))

HTH,
--Michael
 
Back
Top