G
gnewsgroup
I have a GridView, with sorting and paging enabled.
The GridView is bound in code-behind, where I also have the sorting
and paging event handlers.
Both sorting and paging seem to be working fine, but the problem is,
if I click on a page index, the sorting order is reversed. To make it
clear, suppose my GridView has 4 pages like below:
Page 1:
A
B
C
Page 2:
D
E
F
Page3:
G
H
I
Page 4:
J
K
L
If I click on the table header, the data gets sorted, fine, like so:
Page 1:
L
K
J
But, if I then click on the page index 2, I see this:
Page 2:
D
E
F
Whereas, I am expecting to see this:
Page 2:
I
H
G
See the problem? How to overcome this? Thanks.
The GridView is bound in code-behind, where I also have the sorting
and paging event handlers.
Both sorting and paging seem to be working fine, but the problem is,
if I click on a page index, the sorting order is reversed. To make it
clear, suppose my GridView has 4 pages like below:
Page 1:
A
B
C
Page 2:
D
E
F
Page3:
G
H
I
Page 4:
J
K
L
If I click on the table header, the data gets sorted, fine, like so:
Page 1:
L
K
J
But, if I then click on the page index 2, I see this:
Page 2:
D
E
F
Whereas, I am expecting to see this:
Page 2:
I
H
G
See the problem? How to overcome this? Thanks.