Gridview paging problem

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

  • Posted 10 September 2017, 11:31 am EST



    I have a grid view with paging, sorting and filtering, set to 5 records per page with 13 records, I go to the 3rd page and select any row, for some reason the grid switches to first page and shows three records when it should remain on the third one showing three records but third page records not first page records.



  • Replied 10 September 2017, 11:31 am EST

    Hi again!


    If you've seen the code in the snippet I've found what causes the problem, is this:


            protected void C1GridView1_RowCreated(object sender, C1GridViewRowEventArgs e)
                if (e.Row.RowType == C1GridViewRowType.DataRow)
                    e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(((C1GridView)sender), "Select:" + e.Row.RowIndex.ToString());


    I wrote that code so that when user clicks on a row, the grid makes a postback in order to capture it in  the rowcommand event.

    How can I do that with the grid's methods, so I don't have to use this piece if code?



Need extra support?

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

Learn More

Forum Channels