Quick question on Paging

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Gang,

Quick question on Paging on datagrid. Everything works except when I go to
the next page, my datagrid dissapperas. I have post.is back on the page load,
do i need it on the PageIndex changed as well?

Thanks!
Rudy
 
As far as I'm concerned you'll have to reload the data, so in the
PageIndexChanged event you should do something like this (assuming
yourData contains your data :)

yourDataGridInstance.CurrentPageIndex = e.NewPageIndex;
yourDataGridInstance.DataSource = yourData;
yourDataGridInstance.dataGrid.DataBind();

hth,

Matthias
 
Hi Matthias,

I tried your idea, but it didn't work. But in all fairness, I didn't supply
any code. So here is what I Have for the page index.

Dim DsUinv As DataSet

grdUinv.CurrentPageIndex = e.NewPageIndex
grdUinv.DataSource = DsUinv

grdUinv.DataBind()

I'm assuming by gridinstance you mean my datagrid, and mydat is mydataset.

Thanks for all you help.

Have a great weekend!!!!

Rudy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top