Solved C#, paging

Posted on 2010-01-04
Last Modified: 2012-05-08
Exception Details: System.NotSupportedException: The data source does not support server-side data paging.

Source Error:

Line 97:
Line 98:         gridsearch.DataSource = reader;
Line 99:         gridsearch.DataBind();
Line 100:
Line 101:        reader.Close();
Question by:shpresa
    LVL 4

    Accepted Solution

    You have made the same mistake the datasource is an "OdbcDataReader" and a Reader don't support paging. Fill first a DataSet or DataTable and bind it then as DataSource.

    DataTable oDt = new DataTable();
    gridsearch.DataSource = oDt;

    Author Comment

    Great! Worked fine. Thanks a bunch
    LVL 12

    Expert Comment

    If your Obj ectDataSource SELECT method doesnt return a DataSet or a DataReader, youll get the above
    runtime error. Are you using Multiple tables and INNER JOINS etc?

    Take a look at this page it may have the answer:


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now