1

I am using an SPGridView in which I have put paging and filtering facility. But whenever I change the page and then do filtering, the paging disappears.

How can I correct this?

0

You need to again specify pagination in page index change event.

Example

public void gdSharedReport_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
     gdSharedReport.PageIndex = e.NewPageIndex;
     gdSharedReport.AllowPaging = true;
     gdSharedReport.PageIndexChanging += new GridViewPageEventHandler(gdSharedReport_PageIndexChanging);
     gdSharedReport.PagerTemplate = null;
     gdSharedReport.DataSource = DataTable;
     gdSharedReport.DataBind();
} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.