|
-
Nov 18th, 2010, 08:03 PM
#1
Thread Starter
Member
WPF VB - .NET 3.5/4 : Anyway to "disable" a value in a listbox?
I'm looking for a way, if possible, to make values in a listbox "disabled" meaning they get greyed out, but not the entire list. I've got a listbox, that depending on its selected item, populates values into another listbox. What I'd like to do is have something similar to the following code so that if there are no values to populate into the second listbox, then the line is greyed out.
Code:
SQL.CommandText = "SELECT COUNT * FROM Topics WHERE Question =" & ProductID
SQLResult = SQL.ExecuteNonQuery()
Count = SQLResult
If Count =0 Then
lstProducts.selectedRow(2).enabled = false
End IF
obviously the last line (lstproducts.selectedrow.enabled) is a bogus line, but I'm looking for something like that, even if it's applying a template to the box or something.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|