GridView DataBound

Discussion in 'ASP .Net' started by =?Utf-8?B?YmVub2l0?=, Dec 1, 2005.

  1. Hi,

    after binding a SqlDataSource to a GridView, I see 6 records (which is what
    I want to have !)
    But if I request a GridView.Rows.Count in the DataBoundEvent, the result is
    5. And I cannot retrieve the 6th item in my list

    What am I doing wrong?

    thx

    Benoit
    =?Utf-8?B?YmVub2l0?=, Dec 1, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?YmVub2l0?=

    Terry Olsen Guest

    That seems odd. Why get the data from the GridView? Why not get it from the
    DataTable that the GridView is bound to?

    I always use someting like:

    For i as Integer = 0 To GridView.Rows.Count - 1
    'Show me GridView.Rows(i)
    Next


    "benoit" <> wrote in message
    news:...
    > Hi,
    >
    > after binding a SqlDataSource to a GridView, I see 6 records (which is
    > what
    > I want to have !)
    > But if I request a GridView.Rows.Count in the DataBoundEvent, the result
    > is
    > 5. And I cannot retrieve the 6th item in my list
    >
    > What am I doing wrong?
    >
    > thx
    >
    > Benoit
    Terry Olsen, Dec 1, 2005
    #2
    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. Mike Grace
    Replies:
    1
    Views:
    1,915
    Brock Allen
    May 12, 2006
  2. Carlos
    Replies:
    1
    Views:
    8,858
    PeterKellner
    Jun 8, 2006
  3. Replies:
    5
    Views:
    645
  4. rodchar
    Replies:
    0
    Views:
    379
    rodchar
    Nov 26, 2007
  5. Manu
    Replies:
    0
    Views:
    159
Loading...

Share This Page