filtering from multiple dropdownlists

Discussion in 'ASP .Net Datagrid Control' started by DevCon7@gmail.com, Jan 18, 2007.

  1. Guest

    I created a datagrid which populates data from sql server. There about
    8 columns on the grid I need to be able to filter on. I did setup
    several dropdownlists and was sucessfully able to filter based on and
    "AND" crietia.

    ex. CITY = "SSDF" AND STATE ="OK" AND PHONE = "325-695-9656" AND
    .....etc etc ...

    This part seems fine, but my users need to be able to filter somtimes
    on AND and somtimes on OR, but it seems that I have to specify it one
    way or the other.

    Is there a way to collect the criteria and and pass it to the
    datasource at runtime. or any other suggestions as to how I should go
    about doing this.

    Thanks
     
    , Jan 18, 2007
    #1
    1. Advertising

  2. I'm not sure I understand your problem. If the user filters, collect the
    filter and rerun the filter mechanism on the data source. Why does that not
    work?

    --
    Regards,
    Alvin Bruney
    ------------------------------------------------------
    Shameless author plug
    Excel Services for .NET is coming...
    OWC Black book on Amazon and
    www.lulu.com/owc


    <> wrote in message
    news:...
    >I created a datagrid which populates data from sql server. There about
    > 8 columns on the grid I need to be able to filter on. I did setup
    > several dropdownlists and was sucessfully able to filter based on and
    > "AND" crietia.
    >
    > ex. CITY = "SSDF" AND STATE ="OK" AND PHONE = "325-695-9656" AND
    > ....etc etc ...
    >
    > This part seems fine, but my users need to be able to filter somtimes
    > on AND and somtimes on OR, but it seems that I have to specify it one
    > way or the other.
    >
    > Is there a way to collect the criteria and and pass it to the
    > datasource at runtime. or any other suggestions as to how I should go
    > about doing this.
    >
    > Thanks
    >
     
    Alvin Bruney [MVP], Jan 20, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren

    Multiple DropDownLists

    Darren, Aug 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    412
    Steve C. Orr, MCSD
    Aug 18, 2003
  2. Craig Buchanan

    reuse SQLDataReader in multiple dropdownlists?

    Craig Buchanan, Jan 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,285
    Craig Buchanan
    Jan 15, 2004
  3. Angel.Net
    Replies:
    1
    Views:
    360
    =?Utf-8?B?Q3JhaWc=?=
    Jun 15, 2005
  4. RSH
    Replies:
    3
    Views:
    430
  5. viktor9990

    filtering from multiple dropdownlists

    viktor9990, Apr 19, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    177
    Elton W
    Apr 19, 2005
Loading...

Share This Page