CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2002
    Location
    India
    Posts
    31

    Datagrid pageing

    Hi All,

    I have set the paging property of datagrid to true in my web application. Its correctly showing the number of links but the problem is that to view the contents of the page i have to click the page link twice, for ex: say i want to go to page 2, then on the page link '2' i have to click twice then only the contents od page 2 is displayed.
    can anybody please tell me why this is happening.

    thanks,
    santosh

  2. #2
    Join Date
    Dec 2002
    Location
    Sioux Falls, SD, USA
    Posts
    40
    It would surely help if you posted some code.

    Thanks.
    Do what thou wilt, shall be the whole of the law.

  3. #3
    Join Date
    Jan 2002
    Location
    India
    Posts
    31
    Hi ,

    That problem got solved, but theres a new problem I have Used one Combobox and on change of it, in the server side i am applying an filter to the Dataview and binding it to the Datagrid.
    On selection of only one value in the Combobox i get an Error which States as below, for the rest of the values in the combobox the filter is working fine and datagrid is getting binded properly.

    The Error Message:
    " Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount. "

    please tell me why i am getting this error.

    thanks,

  4. #4
    Join Date
    Dec 2002
    Location
    Sioux Falls, SD, USA
    Posts
    40
    I'm not 100% sure (I haven't had time to try it out yet), but you could try to set the CurrentPageIndex in the DataGrid to 0 at the top of the code in the EventHandler for the DropDownList (ComboBox).

    As I said, I'm not sure, but I hope this helps you out.
    Do what thou wilt, shall be the whole of the law.

  5. #5
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    yeah
    in combobox before selecting u should always check the index value and the total items. suppose if it is empty and server tries to get it then it would be a problem.

    Paresh

  6. #6
    Join Date
    Jan 2002
    Location
    India
    Posts
    31
    Thanks for the reply,

    It would be great if you can elobarate on this please.

    Thanks,
    santosh

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured