Results 1 to 3 of 3

Thread: pagnination problem in datagrid

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default pagnination problem in datagrid

    Hi

    i am populating a datagrid on the selection of a dropdown. for pagination i am using the datagrid pagination only. suppose on the datagrid i am on 5th page and i change the datagid populating dropdown its showing error message asking that the page index should be =>0 and <= page count.

    so please help me out in this code...

    Thanks
    rahul

  2. #2
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    could u post EXACTLY the error message?

  3. #3
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Suppose on load its showing 15 records and i have 3 records on each page. And using datagrid default pagination i seen 4 pages so my current page index will be 11. so now when i change the dropdown selection for another records .. its current page index need to set to zero. but its 11 so its showing following error message...

    System.Web.HttpException: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at IPP_Portal.Awards_Recognition.Awards_Info(String sMod_Id, String Mod_name) in c:\inetpub\wwwroot\IPP_Portal\Awards_Recognition.aspx.vb:line 225

    and line no 225 is
    Dgawards.databind()

    please give your input in this.. thanks a lot..
    Rahul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •