Hi,
I have an aspx page in which I am building a DataGrid control in the
code-behind dynamically. The DataGrid is declared along with BoundColumns and
bound to the datasource, then added to a panel control in the OnInit method
of the aspx Page. I am trying to implement a bidirectional sorting. I have a
SortCommand method which fires OK. I have followed the code example given on
the 4GuysFromRolla site, which reads the value from SortExpression and apends
either the ASC or DESC sort commands. When the event is captured first there
is no sort command so I append e.SortExpression with DESC as the default is
ASC. The problem is that when the event fires next the SortExpression doesn't
contain the ASC DESC command. I am sure this has something to do with the
ViewState as the DataGrid is being built at every round trip. Question is how
to get round this??
--
Gilkesy