run query on sqldatasource or datalist

M

mharness

Hello,

Not sure if what I'm trying to do is possible or even a good idea. I have
a datalist that can contain maybe 100 items shared among perhaps 20
accounts. Looks something like this:

accountid itemid
a 1
a 2
b 5
b 6
a 8
c 9

I would like to provide a dropdown unique list of accountids for the user to
choose from and then apply an accountid filter to the datalist so the user
only sees items belonging to the chosen accountid.

The dropdown list would look like this:
a
b
c

and when the user makes a choice--like "a"-- the datalist would look like
this:

a 1
a 2
a 8

Pretty sure I can do all that but (I think) I need to be able to run a
grouped query on the datalist contents to populate the dropdown list and
that's where I'm stuck.

Any comments, suggestions, or alternatives would be appreciated.

Thanks,

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top