I get the paging to show when the RadGrid is shown, but when I try to click for the next page the RadGrid disappears.
Here are the following screenshots that might help with this problem
Please help with some guidance to help me resolve this issue.
You don't need the
PageIndexChanged
event, since you're not doing any funky stuff there.As Ali Issa said, you should use the
OnNeedDataSource
event, which is gonna be called when you fetch for next page.So follow these steps:
Remove the following code:
in your aspx file:
OnPageIndexChanged="RadGrid1_PageIndexChanged"
And add the following code:
in your aspx file:
OnNeedDataSource="RadGrid1_NeedDataSource"
One last thing: Don't forget your
tbl
variable must be re-assigned on every server call (unlesstbl
is aSession
variable). So, make sure tbl is at least defined in yourPage_Load
but the best would be to replacetbl
to some Database call.