Gridview filter issue

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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
 
Back
Top