2

I found out, that you can filter a list view in a JSLink File very easy by a postback:

function filterList(ctx, filterField, filterValue){ __doPostBack(controlId, 'NotUTF8;__filter={' + filterField + '=' + filterValue + '}'); return false; } 

Is there a way to sort the ListView as well by __doPostback() as well?

Something like this:

__doPostBack(controlId, 'NotUTF8;__order={' + filterField + ', asc}'); 

I'm sure this is possible but I can't find the right syntax...

thx

Update: Ok, Sebastian Schütze seems to be right: It's not possible :-(

But I still have the baisc problem of sorting: https://sharepoint.stackexchange.com/questions/162559/js-link-and-csr-how-to-use-default-sorting-filtering-and-override-header

2
  • why are you sure? If I search for the string "NotUTF8;__filter" in all the javascript files which are loaded on a list, i can clearly find the function to do this postback. but there is no other kind of postback implemented. Maybe you should consider using the JSLink features to sort your list instead of sending a direct post back. Sorting is possible for JSLINK and CSR. Commented Nov 4, 2015 at 13:31
  • How do I trigger filtering and reloading an existing list via js link? Commented Nov 5, 2015 at 9:07

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.