I'm trying to change the color of certain items in my listbox in the filtering item to be red if the item contains parenthesis. I am doing a simple databind to populate my listbox in the FilterCheckListItemsRequested event from a datatable which I populate myself.
e.ListBox.DataSource = dtDataForFiltering; //DataTable
e.ListBox.DataKeyField = datafield;
e.ListBox.DataTextField = datafieldtext;
e.ListBox.DataValueField = datafield;
e.ListBox.DataBind();
This is working fine. Now I am trying to find out how to alter the items in the listbox after it has been filled with data. I tried looping through it's items and setting the color, but I am not sure if I am doing this correctly or if this is the correct place to do it. Any help would be appreciated.
Please see image attached. I am trying to alter items in my filter to be red if in parenthesis, just like the grid in the background.