Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox question

Status
Not open for further replies.

KreativeKai

Programmer
Nov 12, 2004
33
0
0
US
I have a program which reads a series of employee names and ID numbers into a dataset and then sets the datasource of a combobox to that dataset. Below is some of the logic:

.cbxEEName.DataSource = ds.Tables("EmpmastTbl")
.cbxEEName.ValueMember = dt.Columns("EmpID").ToString
.cbxEEName.DisplayMember = dt.Columns("FullName").ToString
.cbxEEName.Visible = True

Since the list of names include both active and terminated employees, is there a way to bold the names of an employee who is active, and leave terminated employees as a regular font?

Any ideas are appreciated?



Lost in the Vast Sea of .NET

Visit my website at www.komputing.com
 
Thanks for the suggested link, but I'm not subscribed to experts-exchange so I can't see the solution. The article looks like it is more geared towards changing the color of the item selected.

I'm actually interested in having the drop down list show active employees in the list as bold and inactive employees as regular text.

Lost in the Vast Sea of .NET

Visit my website at www.komputing.com
 
I don't beleive there is an easy way to do this. I think RiverGuy described a way of inheriting the combo box object, overriding the paint method and acheiving it that way. You may also want to look into 3rd party controls, someone else may have a turn key solution for you.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top