I added an Open buttonField to GridView to open a second GridView then
checked AllowSorting on the second. I got error saying the Sorting
event was not handled. I added my own Sorting event handler with the
following line:
GridView2.Sort( e.SortExpression, e.SortDirction );
Then I got an exception saying there was an infinite loop. Tracing the
code with debug I did find that this line was executed repeatedly
without ending. I replaced "e" expression with some constant values,
resulting in the same error. Can't think of other alternatives.
When searching MSDN I found that Sort() in GridView has sample code
used by a button. So maybe Sort() can not be used in the Sorting
handler? Please help.
My second GridView uses the data selected from the first GridView.
In the first GridView the data source is a SQL Server table. The
sorting is fine without needing any extra code.
Thanks!
Charles
11/18