1

I have added a list view web part in a page and have attached a JSLink to customize the look and feel of the list. The list has a "Category" column. I would like to filter the list based on the Category selected by the user.

I have learned that by passing the FilterField1 and FilterValue1 parameters in the URL (like for example: FilterField1=Category&FilterValue1=General Gifts) the list is getting filtered.

I would like to know whether there is any better approach (using JavaScript and CAML) and how to apply the filter to List for customization.

Thanks,

1

I always prefer to filter on server side rather than client side. You can create a separate page add Query String filter webpart and your List View Webpart and configure the filtration. Take a look at this blog post: http://j.mp/1p9V8GD

Now you can pass the filter value as query string parameter to that page and filtration will be done.

Once you done you can also specify your JSLink to render in your own way.

Hope this help.

Amit

  • Thank you Amit for the solution. It helped me a lot and I have implemented your solution. On another note, I would like to know whether it is possible to achieve the same using JavaScript (JSLink). – Phani Kumar M May 27 '14 at 13:55
  • @phani I have not worked with JSLink yet so no idea about it. – Amit Bhagat May 27 '14 at 23:57
  • Link given in answer is dead – danieldekay Feb 8 '15 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.