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
 
Back
Top