GridView RowCreated Handler Issues

Discussion in 'ASP .Net' started by bigbrorpi@gmail.com, Apr 24, 2006.

  1. Guest

    I'm having a problem with a Gridview bound to an objectdatasource. I've
    created a handler for onRowCreated with something as simple as:

    msgbox(e.row.cells(1).text)

    When the page loads, I see all of the data rows from my datasource, but
    the e.row.cells(1).text comes up blank for every row except the header
    and footer.

    Does anybody see what I might be missing here?

    Thanks
    , Apr 24, 2006
    #1
    1. Advertising

  2. Jeff Dillon Guest

    Well, for one thing, you can't use msgbox, it's on the server!

    Perhaps you meant response.write

    What does the data look like coming from the datasource? Is it a SQL query?
    What does the query return in Query Analyzer, if so

    Jeff

    <> wrote in message
    news:...
    > I'm having a problem with a Gridview bound to an objectdatasource. I've
    > created a handler for onRowCreated with something as simple as:
    >
    > msgbox(e.row.cells(1).text)
    >
    > When the page loads, I see all of the data rows from my datasource, but
    > the e.row.cells(1).text comes up blank for every row except the header
    > and footer.
    >
    > Does anybody see what I might be missing here?
    >
    > Thanks
    >
    Jeff Dillon, Apr 24, 2006
    #2
    1. Advertising

  3. fiendiest

    Joined:
    Oct 25, 2007
    Messages:
    1
    GridView Problem

    I think you may have added a handler to RowCreated, which is only fired when the header and footer are created.
    But if you are data binding you need to add a handler to RowDataBound, which is fired for every row as it is bound.

    Xopher
    fiendiest, Oct 25, 2007
    #3
    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. Pipo
    Replies:
    1
    Views:
    653
    Teemu Keiski
    Apr 1, 2006
  2. K B
    Replies:
    1
    Views:
    12,290
    PeterKellner
    Jun 6, 2006
  3. Paul
    Replies:
    2
    Views:
    2,874
  4. benji
    Replies:
    0
    Views:
    770
    benji
    Feb 29, 2008
  5. Bogdan
    Replies:
    0
    Views:
    582
    Bogdan
    Sep 29, 2008
Loading...

Share This Page