B
Brian Lowe
I have a DataGrid which uses a dataset as its source. I have it set to allow
paging and page length set at 9 rows, and page style set to numeric. My
dataset has 25 rows, so just as expected I see rows 1 to 9 and paging links
1 to 3 with "1" as a static label and "2" and "3" as linkbuttons.
OK - here's where the fun starts.
I click "2" and get a postback, but the grid still shows rows 1 to 9 and
the paging controls still show 1 as static and 2 and 3 as active links.
I click "2" a second time. The grid still shows rows 1 to 9 but the paging
controls change so that 1 is active, 2 is static and 3 is active.
But the wierdness doesn't stop there.
I click "3". The grid still shows rows 1 to 9 but the paging controls change
so that 1 is still active, 2 is still static and 3 is still active.
I click "3" again. The grid now shows rows 1 to 7 and the paging controls
change so that 1 is still active, 2 is now active and 3 is now static.
OK - so I figure that the grid has somehow clocked the fact that it should
only be showing 7 rows because it's on page 3, but how come it's showing
rows belonging to page 1?
Now, "1" is an active link, so I click it, and then the grid content changes
to show rows 1 to 8 and some columns of row #9.
I've looked at the code and it seems to match exactly the examples (aside
from the structure of the test dataset) on MSDN and various other coding
support sites.
I've set Trace="True" and watched the output and can see nothing different
in my page to what's in a (really over simplistic) example.
I've stepped through the code line by line in the Visual Studio IDE. Nothing
raises any errors. Everything seems to happen just when it should.
I've searched Google, MSDN et al for anything that might discuss symptoms
similar to these, and I'ev drawn a blank.
I just know I'm going to look stupid when the cause is revealed to be
something obvious and trivial, but what the heck. Nothing's idiot proof to a
really talented idiot!
Brian
paging and page length set at 9 rows, and page style set to numeric. My
dataset has 25 rows, so just as expected I see rows 1 to 9 and paging links
1 to 3 with "1" as a static label and "2" and "3" as linkbuttons.
OK - here's where the fun starts.
I click "2" and get a postback, but the grid still shows rows 1 to 9 and
the paging controls still show 1 as static and 2 and 3 as active links.
I click "2" a second time. The grid still shows rows 1 to 9 but the paging
controls change so that 1 is active, 2 is static and 3 is active.
But the wierdness doesn't stop there.
I click "3". The grid still shows rows 1 to 9 but the paging controls change
so that 1 is still active, 2 is still static and 3 is still active.
I click "3" again. The grid now shows rows 1 to 7 and the paging controls
change so that 1 is still active, 2 is now active and 3 is now static.
OK - so I figure that the grid has somehow clocked the fact that it should
only be showing 7 rows because it's on page 3, but how come it's showing
rows belonging to page 1?
Now, "1" is an active link, so I click it, and then the grid content changes
to show rows 1 to 8 and some columns of row #9.
I've looked at the code and it seems to match exactly the examples (aside
from the structure of the test dataset) on MSDN and various other coding
support sites.
I've set Trace="True" and watched the output and can see nothing different
in my page to what's in a (really over simplistic) example.
I've stepped through the code line by line in the Visual Studio IDE. Nothing
raises any errors. Everything seems to happen just when it should.
I've searched Google, MSDN et al for anything that might discuss symptoms
similar to these, and I'ev drawn a blank.
I just know I'm going to look stupid when the cause is revealed to be
something obvious and trivial, but what the heck. Nothing's idiot proof to a
really talented idiot!
Brian