E
Eric
I have a GridView control that I want to sort on multiple columns when I
click a particular column. For example, I display Last name + ", " + First
name in the first column and display id in the second column. When clicking
on the first column, I want the GridView to sort on LastName and FirstName.
Based on Microsoft's documentation of SortExpression property, all I have to
do is to set SortExpression=LastName,FirstName on the first column. But when
the GridView sorts the data, it only applies sorting direction to the second
parameter of the SortExpression. In the above example, if I click on the
first column, the GridView apparently always does sorting by LastName in
ascending order, but the FirstName sort can be either ascending or
descending (depending on whether I clicked the first column once or twice).
I would expect the GridView to sort the entire sort expression on
ascending/descending order, but it looks like the GridView does this only
for the last parameter in the sort expression. Is this a bug or what?
click a particular column. For example, I display Last name + ", " + First
name in the first column and display id in the second column. When clicking
on the first column, I want the GridView to sort on LastName and FirstName.
Based on Microsoft's documentation of SortExpression property, all I have to
do is to set SortExpression=LastName,FirstName on the first column. But when
the GridView sorts the data, it only applies sorting direction to the second
parameter of the SortExpression. In the above example, if I click on the
first column, the GridView apparently always does sorting by LastName in
ascending order, but the FirstName sort can be either ascending or
descending (depending on whether I clicked the first column once or twice).
I would expect the GridView to sort the entire sort expression on
ascending/descending order, but it looks like the GridView does this only
for the last parameter in the sort expression. Is this a bug or what?