Ordering the task list item based on the priority

  • 4 August 2010
  • 3 replies
  • 1 view

Badge +11

Dears


I have a wrapper class for the worklist in k2.


i want to order the task list items based on priority then based on date. from within my code.


is that possible? how to set the priority?


3 replies

Badge +11

any body!!!

Badge +6

I think it is possible to set the priority because in the SharePoint K2 worklist webpart, I can set those filters. May be you can refer to the source code of that webpart to achieve your goal


http://www.k2underground.com/groups/k2_worklist_web_part/default.aspx


 

Badge +6

Hi Bashar,


You should have a look at the WorklistCriteria object in the Workflow.Client API. On this object you can add sort fields with the AddSortField() method. This allows you to set the field to sort on as well as the direction. You can add multiple sort fields, so you should also be able to add a sort on the Status and then the Date.


Hope that helps,


G

Reply