TrialUser
asked on
filtering results in listview by column name
HOw can I filter results in a listview control. I have 5 boolean fields that I would like to show in a drop down and filter on those columns. please help thanks
More description please. What 5 fields? What columns are shown in Listview? How are you accessing data? Using AccessDataSource/SqlDataSo urce?
ASKER
I call a SQL Server stored procedure to return data. I bind the Dataset.tables(0) to the listview on Page Load.
I have some boolean fields like : IsRecyclable, IsGreen, IsFreeShippable and so on.
I would like to have a drop down for these boolean fields like :
Show All, Only Green, Only ISFreeShippable = true
So is there anything inbuilt in asp:listview that I could take advantage of? Or should I have a drop down and on Selected Indiex change fetch data again from SQL and bind it? Please help thanks
I have some boolean fields like : IsRecyclable, IsGreen, IsFreeShippable and so on.
I would like to have a drop down for these boolean fields like :
Show All, Only Green, Only ISFreeShippable = true
So is there anything inbuilt in asp:listview that I could take advantage of? Or should I have a drop down and on Selected Indiex change fetch data again from SQL and bind it? Please help thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Selected Index change
property of
your Dropdown
and In the select Query
pass the id or the filter
option you want
and with selected index changed
event of Dropdown
Fill the Listview
try this..will work