|
I Have a gridview . When i click one of the files in the gridview , it will display the file details in a table in the grid.But if i am in 20th or 19th page of the gridview, after clicking on the file , the grid is comming to page 1. Is there any property for the grid to prevent this.
|
|
|
|
|
Basically Viewstate maintain all this information about current page of the grid. check if it is not disabled for you. another way is, you can also store page number in the session and update only when next,previous ,first, last button click or grid is refresh.
hope this will help you.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
Never ever do that. I did twice and 2 diffrent apps and it was always mistake to store anything in session besides some user data valid to user not for some page. For example in one grid there was date filter. Stored in session and empty this caused app to crash in that particular page.
No more Mister Nice Guy... >: |
|
|
|
|
|
As i said that, session is not preferable. but it is an alternative. from each and every scenario we need to check if page number is updated correctly.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
Why not control state? It suppose to work even with view state disabled. Or hidden field? In that way page will be set to one in case of page refresh as user would expect.
No more Mister Nice Guy... >: |
|
|
|
|
|
Disable the viewstate and change the grid page. it will not work.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
So why even bother to use something else then view state?
No more Mister Nice Guy... >: |
|
|
|
|
|
That's what i said in my answer. if it is disabled, then paging will not work.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
Ok. So this discusion is pointless.
Take care
No more Mister Nice Guy... >: |
|
|
|
|
|
Hi,
I think you can try to record the page index (a hidden controls or others), and in your click event, the gridview should turn to that page first.
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:49am.
|
|
|
|