Well it fires both events. So if you put your code to load the dataset into
the Grid in the Page_Load, then yeah, you will be doing it twice. Just make
sure in your page load you load the datagrid once by doing this:
if(!IsPostBack)
{
// do this ONLY the first time the page loads
}
else
{
// do this on all other postback request to this same page
}
Then you are free to load the dataset and bind the datagrid in the
PageIndexChanged. I think this answers your question, but if I didn't a
least I tried! :)
--
TDAVISJR
aka - Tampa.NET Koder
"Danky" <Da***@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
well, not too much... but anyway thanks...
well, maybe I didn't explain very well.... and well... simplfy my question
would be:
When I change of page, Is first thrown the event PageIndexChanged
or the PageLoad, or just only the PageIndexChanged?
Thanks.
"TDAVISJR" wrote:
You probably can cache the Dataset and just work with an in-memory copy.
When you need to use the dataset then cast it back out of the cache
object.
I just hope I am understanding your question. Did this give you any
help?
--
TDAVISJR
aka - Tampa.NET Koder
"Danky" <Da***@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com... > Hello Masters!
>
> Anyone can help me with the datagrid,
> well, the app load a lot of data from DB and it show on the datagrid,
> and
> well,
> I need to allow paging and.... the issue is with the event
> PageIndexChanged
> of the datagrid 'coz every time when the user change of page the app
> load
> again all data and another processes with the data even though I have
> load
> one dataset with the data for the datagrid..... the question is?
> What can I do to link the datagrid with the dataset on the event?
>
> Thanks a lot in advanced.
>