Rambabu CH

Rambabu CH

  • NA
  • 80
  • 32.5k

How to change the view query for list viewr webpart dynamically

Jan 11 2012 7:53 AM
Hi,

I had a document library with metadata columns(Title,Code,....).

I am placed this webpart in my page using listviewr webpart, and it showing records from the document library. I want search criteria for this list. Based on the search criteria records should be displayed in my webpart.

My approach: i had taken one visual webpart and i placed 2 text boxes for Title and Code and i placed a button named Search. i have created a view for the document library view name is SearchView. I placed the webpart on the page and selected that view for that list. When i click on the button i am getting that view and changing the view query(This is caml query, with contains of textboxes text). But the list records not updating based on the search criteria.

code attached as text file, This code is in Search button click, code executing without any error but list on the page not updating with search criteria.

Here page contains one visual webpart and listviwer webpart.


Answers (1)