3

I know in 2010 there was a way how to add custom sorting by Managed Property, it was obtaining data provider in overriden method and than just set the sort property and direction. However in 2013 I didnt find a way how to add custom sorting in code, i mean like inheriting the ResultsScriptWebPart. I found out event called BeforeserializeToContent which gives me DataProviderScriptWebPart and here Iam able to customize the query at least. So question is how to customize the sort order? Thanks. P.S.: Not using querystring, thanks

1
  • Hi, so I found solution. There is property called DefaultAvailableSorts:ComplexResultSort[] and is marked as virtual, so just overriding it and providing custom array will do the job.
    – Ivan
    Aug 22 '13 at 11:56
1

so I found solution. There is property called DefaultAvailableSorts:ComplexResultSort[] and is marked as virtual, so just overriding it and providing custom array will do the job.

1
  • It would be nice if you could share your code. Thanks, Balu
    – user38494
    Jan 8 '15 at 17:33

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.