C1GridView - Pagination with DataSet

Posted by: linkservice on 10 September 2017, 11:31 am EST

  • Posted 10 September 2017, 11:31 am EST

    Hi, i have a gridview bounded to a dataset.


    my dataset has 300 rows (for example).


    if i set the "pagesize" to 100 the grid says that there is only 1 page.


    if I set also the VirtualItemCount the grid says there are 3 pages but if i set the currentpageindex to 2 it shows me the first page again...


     


    example (dssoggetti1 is my DataSet):


    C1GridView1.PageSize = 100;
    C1GridView1.DataSource = dssoggetti1;


    C1GridView1.DataBind();


    -- THE GRID SAYS ONLY 1 PAGE


     


    example 2:


    C1GridView1.PageSize = 100;


    C1GridView1.VirtualItemCount = dssoggetti1.SOGGETTO.Rows.Count;



    C1GridView1.DataSource = dssoggetti1;


    C1GridView1.DataBind();


     


    -- THIS WAY IT SHOWS ME 3 PAGES BUT EVEN IF I SET THE CURRENTPAGEINDEX TO 2 I SEE ONLY THE FIRST PAGE


     


    Thank you

  • Replied 10 September 2017, 11:31 am EST

    Did you set AllowPaging property?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels