Change datalist color based upon SQL query

I have a datalist which is loaded at run time from Access. What I am trying to do is when I click on a button will execute a SQL query to another database and if any of the data returned from the SQL query toggle the background color of the matching item in the datalist. So once the SQL query runs it will search the datalist for a match and then if it finds one then it will colorcode it.
edrz01Asked:
Who is Participating?
 
Alpesh PatelCommented:
You can use GridView

and keep that GridView with Single columns. and make Design like Listbox
u can change color of cells or gridview as per the returned value of SQL
if u are good designer too then u can Design GridView as like as ListBox
thanx
0
 
Alpesh PatelCommented:
Is this web page or Winform
plz let me know

0
 
edrz01Author Commented:
Sorry, webform. 2005
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Alpesh PatelCommented:
You can not play with the background color of perticular Item in the Listbox or Dropdowncombo box
for the webpage
 <asp:ListItem></aspListItem> is the control for the item in the ListBox and DropDownCombo box
and  <asp:ListItem> doesn't have the Backcolor attribute or similar to that
so you can change whole background color of Listbox or DropdownCombobox but can not change color or Item

sorry
thanx
0
 
edrz01Author Commented:
Ok, is there a way to search the datalist for values returned by the SQL query?
0
 
edrz01Author Commented:
Fair enough - now is there a way to layout the gridview for multiple columns?
0
 
Alpesh PatelCommented:
ya of course you can do it
its depends on you how u use GridView

some of thing you have to do with tricky method

thanx
0
 
Alpesh PatelCommented:
I Request you to change your Question type to Programming asp.net rather then VB.net

for the point prospect
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.