Gridview filter issue

G

Guest

I have a grid view with a filter based on a dropdown list. when i select a
page on the gridview the filter gets dropped. What is the correct way to
handle paging when using a filter?
asp.net 2.0 vb
 
G

Guest

How are you applying the filter, if you are using a ControlParameter pointed
at the drop downlist that is a paramter of the DataSourceControl that is
bound to the GridView, then this should just work. If you are filtering a
different way then i sugest that you re-apply the filter in the
PageIndexChanged event handler of the GridView.
 
G

Guest

Thanks for responding,
On change of DDL i set gv.filter = "lastname like '" + ddl.selectedvalue +
"%'" This doesn't hold state on postback then. so on the page event i have to
re-apply the filter each time. That's no fun. Is there a way for it to hold
state and only apply it once?
THanks
KES
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top