Unable to set the sort direction to no sort
I am trying to set the sort direction to no sort for the sorts using the below code and getting the exception followed.
Error: "Invalid sort direction"
for (int i = 0; i < count; i++)
I am doing this to handle removing sorting on Groups. I am getting error if try to delete the default sort provided on the groups. Getting the invalid field error and SAP agreed that there a bug. So as an alternative when user tries to delete sort provided on group I am setting it to NoSort and not showing it to the user if the sort direction is no sort.
Please let me know how can we set the sort direction to No sort or how can we remove the sorts on the groups.