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 PatelConnect With a Mentor Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
All Courses

From novice to tech pro — start learning today.