Both AllowHeaderColumnsSorting="True" and AllowHeaderRowsSorting="True" are not working for me. Any clue ?
Hi Rajib,
From your picture it looked like you did have some sort of hierarchy defined but I guess you just have multiple row dimensions applied? If that's the case then yes, sorting only works if there is a hierarchy to sort. So if you had a hierarchy setup where all of the "Grade" values were contained under an "All Grades" level, you could sort on the "All Grades" level and it will sort the individual grades underneath it.
Looks like, per your one of the earlier comments if I don't have a hierarchy, I cannot sort rows/columns.
Actually in my scenario there is no hierarchy. Its a flat structure.
Say you have a class Student and with the three given properties, where strings Name and Grade will be dimensions and Percentage is a measure. DataSource will be list of Students.
public class Student
{
public string Name {get; set;}
public string Grade {get; set:}
public double Percentage {get; set:}
}
I applied the Office2010Blue theme to the pivot grid and the sorting buttons appear in the header as I expect. Clicking on this button sorts the headers in ascending / descending order. I attached my sample and a screenshot that shows the sorting button in the All Periods column header. This column header is highlighted like this because my mouse is over it.
I am using Office theme.....