Question about the ListBox.DataBinding method. I'm loading a listbox with a DataRows array object and I want to check for each DataRow element a column value if its true/false. If the column value is true, then modify the style for the current listBox.ListItem object. Below is some sample code.:
System.Data.DataRow[] rows = Data.SchoolDetails.Select(filter);
lstBox.DataBinding += new EventHandler(lstBox_DataBinding);
lstBox.DataSource = rows;
lstBox.DataTExtField = "Value";
lstBox.DataValueField = "ValueCode";
lstBox.DataBind();
static void lstBox_DataBinding(object sender, EventArgs e)
{
ListBox l = (ListBox) sender;
}