Highlighting Dropdownlist row depending on data from datasource

I have a SQL datasource on a page which populates a dropdown menu.

               <asp:SqlDataSource ID="DSUnitAvailable0" runat="server" ConnectionString="<%$ ConnectionStrings:IRISConnectionString %>" SelectCommand="GET_AVAILABLE_QUALSCHEME_UNITS_IVRECORD" SelectCommandType="StoredProcedure">
                            <asp:SessionParameter Name="IVRECORDID"  SessionField="IVRECORDID" />

Open in new window

<asp:DropDownList ID="ddlUNIT02ID1" runat="server" AppendDataBoundItems="True" CssClass="selectpickedr" data-live-search="true" DataSourceID="DSUnitAvailable0" DataTextField="QUALSCHEMEUNIT" DataValueField="QUALSCHEMEUNITID">
                 <asp:ListItem Selected="True" Value="0">-</asp:ListItem>

Open in new window

I also have another field being returned by the datasource which is called ' Highlight' . This can either be 1 or 0.  

What I'd like to do is highlight the row on the dropdown menu if 'the field 'Highlight'    is  1
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy DownsOWNERCommented:
Maybe you can adapt this.

we can determine whether the UnitPrice value bound to the DetailsView has a value that exceeds $75, but we've yet to see how to programmatically adjust the DetailsView's formatting accordingly. To modify the formatting of an entire row in the DetailsView programmatically, access the row using DetailsViewID.Rows(index); to modify a particular cell, access DetailsViewID.Rows(index).Cells(index). After we have a reference to the row or cell, we can adjust its appearance by setting its style-related properties.

Accessing a row programmatically requires that you know the row's index, which starts at 0. The UnitPrice row is the fifth row in the DetailsView, giving it an index of 4 and making it programmatically accessible using ExpensiveProductsPriceInBoldItalic.Rows(4). At this point, we could have the entire row's content displayed in a bold, italic font by using the following code:

ExpensiveProductsPriceInBoldItalic.Rows(4).Font.Bold = True

ExpensiveProductsPriceInBoldItalic.Rows(4).Font.Italic = True

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.