BUG : DataGrid ?!

Discussion in 'ASP .Net Web Controls' started by Ben, Oct 28, 2003.

  1. Ben

    Ben Guest

    Hi,

    I have come across a situation which appears to be a BUG
    with the DataGrid control (asp:datagrid)

    Following the application of a fliter on a PostBack, it
    seems the total number of items (dgItems.Items.Count) of
    the control varies depending on its page size ?

    What prompted me to look this in more depth is that 2
    pages show at the bottom of the grid and when the user
    clicked on the '2' to get to the second page, nothing
    happens.

    I initially had a data grid with a page size of 8 and a
    filter which filters the datagrid down to 8 items.

    Theoretically, if there are 8 items (rows) and a page
    size of 8, the page should not display pages...? First
    problem.

    If I change the page size to 9, the number of items now
    displayed by the datagrid is 9 and the page does not
    display anymore page BUT there now 9 items displayed...?!
    How can the page size affect affect the result of a
    filter ?!

    I actually ran this in 'debug mode' with a break point in
    my code and witnessed the number of items (Items.Count)
    change before my eyes in the watch window as I changed
    the page size value.

    Here is a sample of code :

    (...)
    With oDV
    .Sort = strSortField & strSortOrder
    .RowFilter = mstrFilter
    End With

    With dgItems
    .PageSize = 8
    .PagerStyle.Mode = PagerMode.NumericPages
    .DataSource = oDV ' A DataView object
    .DataBind()
    End With
    (...)

    Any ideas ?

    Thank you,

    Ben
    Ben, Oct 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John

    Re: BUG? OR NOT A BUG?

    John, Sep 20, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    544
  2. RedEye
    Replies:
    2
    Views:
    578
    Jason Kester
    Dec 13, 2005
  3. Michel Joly de Lotbiniere

    Bug Parade Bug 4953793

    Michel Joly de Lotbiniere, Nov 30, 2003, in forum: Java
    Replies:
    4
    Views:
    638
    Michel
    Dec 2, 2003
  4. DarkSpy
    Replies:
    4
    Views:
    879
    tom_usenet
    Jun 27, 2003
  5. Andreas Klemt
    Replies:
    0
    Views:
    292
    Andreas Klemt
    Oct 8, 2003
Loading...

Share This Page