How to make a DropDownList control display some items in bold ASP.Net

Posted by james lewis on Stack Overflow See other posts from Stack Overflow or by james lewis
Published on 2010-05-25T09:45:45Z Indexed on 2010/05/25 9:51 UTC
Read the original article Hit count: 402

Filed under:
|
|

I'm working with a custom DropDownList control in ASP.Net and there's been a request to display certain items in the list with a bold typeface (NOTE - the control inherits from CompositeDataBoundControl so it can be data bound... not DropDownListBox). The control is bound to a table and there's a column in the table named IsUsed - if this is set to true, the corresponding item in the list should be rendered bold. (It should be noted here that this will only ever be viewed in FireFox.)

My experience is all in the middle \ backend tiers so the presentation layer is very new to me - can someone point me in the right direction? My initial thought was that somewhere in the custom control I would have access to all the rows that are returned from the data source which I could cycle through etc but I'm not sure if that's possible... There's also RenderContents which I can override... looks interesting!

Any help appreciated - cheers.

James

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET