I have a web page that is a customized list item form that contains editable "master" entry details and an XSLT list view for showing associated "detail" records. I am struggling with properly initializing an XSLT List View's column filter with desired default settings upon loading the web page.
Here are the options I have already tried with no luck so far:
- Using the clause in the CAML query. This does the job but at the same time effectively disables any further column filtering for the user.
Using the Query String Filter Web Part with a pre-defined default value. This almost does the job except for the "Clear Filter" option because obviously the Query String Filter does not react to the ClearFilter query string parameter.
Passing necessary filter values in the query string parameters (e.g. FilterField1=...&FilterValue1=...). This option works fine, however the problem is that there seems to be no easy way to pass these query string parameters to the page from the "Edit Item" ECB menu item.
As for the ECB menu, I got as far as completely overriding the JavaScript code that constructs the ECB menu and "hacked" it in a way that I append the necessary query string params to the URL passed by SharePoint to the EditItem2 JS function call.
If only that worked... turns out, the EditItem2 call sends the user to the "listform.aspx" page that, in turn, redirects the user to my page, but unfortunately now without the additional query string params.
Of course I can hack the ECB menu construction routine even further so it sends the user directly to my page, bypassing the listform.aspx one. But I have very limited experience in SharePoint so I am not sure what side effects this might cause.
Is this the only (and at all a correct) way to initialize the column filter? Unfortunately I couldn't google anything useful on the subject matter so I hope to get some insights from the community.
Thanks in advance!