Link to home
Start Free TrialLog in
Avatar of edrz01
edrz01Flag for United States of America

asked on

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.
Avatar of Alpesh Patel
Alpesh Patel
Flag of United States of America image

Is this web page or Winform
plz let me know

Avatar of edrz01

ASKER

Sorry, webform. 2005
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
Avatar of edrz01

ASKER

Ok, is there a way to search the datalist for values returned by the SQL query?
ASKER CERTIFIED SOLUTION
Avatar of Alpesh Patel
Alpesh Patel
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of edrz01

ASKER

Fair enough - now is there a way to layout the gridview for multiple columns?
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
I Request you to change your Question type to Programming asp.net rather then VB.net

for the point prospect