By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,101 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,101 IT Pros & Developers. It's quick & easy.

Datagrid and paging

P: n/a
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.

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Nov 19 '05 #2

P: n/a
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.


Nov 19 '05 #3

P: n/a
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.
>


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.