A
aamirghanchi
Hi, I need to know if anyone else came across this. The Session
variable value I set in a sortCommand event handler of a datagrid does
not hold on till the next sortcommand event handler and reverts back
to its original value, the one I had set it before in the previous
trip sortcommand event handler.
I am trying to implement bidirectional sorting on a datagrid by making
use of session variable Session("SDirection"). In the sortcommand
event handler I check for its value and change it to DESC if its ASC
and vice-versa as follows:
Session("SDirection") = IIf(Session("SDirection") = "ASC", "DESC",
"ASC")
For the sake of simplicity I am not checking for the column in the
above code ... just the direction.
It sorts the dgrid fine for that pass, but next time a column (or same
column) header is clicked then in the sortcommand handler I find the
value to be the same that it was before I had made the change.
In the web.config the session configuration looks like this:
<sessionState mode="InProc" cookieless="AutoDetect" timeout="20"/>
This app was originally in .Net 1.1 and was working perfectly fine
(and is on the 1.1 framework), but after converting it to 2.0 it has
lost this functionality.
If any one has had the same issue then please share.
thanks.
variable value I set in a sortCommand event handler of a datagrid does
not hold on till the next sortcommand event handler and reverts back
to its original value, the one I had set it before in the previous
trip sortcommand event handler.
I am trying to implement bidirectional sorting on a datagrid by making
use of session variable Session("SDirection"). In the sortcommand
event handler I check for its value and change it to DESC if its ASC
and vice-versa as follows:
Session("SDirection") = IIf(Session("SDirection") = "ASC", "DESC",
"ASC")
For the sake of simplicity I am not checking for the column in the
above code ... just the direction.
It sorts the dgrid fine for that pass, but next time a column (or same
column) header is clicked then in the sortcommand handler I find the
value to be the same that it was before I had made the change.
In the web.config the session configuration looks like this:
<sessionState mode="InProc" cookieless="AutoDetect" timeout="20"/>
This app was originally in .Net 1.1 and was working perfectly fine
(and is on the 1.1 framework), but after converting it to 2.0 it has
lost this functionality.
If any one has had the same issue then please share.
thanks.