Datagrid ItemCreated happens Before Postback???

Discussion in 'ASP .Net' started by Lars Netzel, Sep 10, 2004.

  1. Lars Netzel

    Lars Netzel Guest

    Hi! I'm so confused right now..

    I have a Page that load a datagrid with a a bunch of radiobuttons in three
    columns which are then checkes or uncheck in the ItemCreated.(it's supposed
    to be a permission setting for different things in my application)
    There is a save button on the page to save the permissions set in the grid.

    The BindGrid() is called if it is NOT a postback in the PageLoad.

    Then, in debugging, when the User presses the Save button update the
    permissions, for some reason.. the ItemCreated is breaking before I have
    even gotten to the PageLoad... and in there the Radiobuttons are set so that
    the radiobutton for "no access" is checked, this means the selection of
    Radiobuttons the user made is overwritten.

    THEN is goes to the PageLoad and THEN is updates the Permissions... thru the
    btnSave_Click()

    Why on Earth is the ItemCreated Happening before the PageLoad...??? I see no
    point in this and is there a way to stop it from happening?

    Best Regards/
    Lars
     
    Lars Netzel, Sep 10, 2004
    #1
    1. Advertising

  2. Lars Netzel

    Greg Burns Guest

    I believe I fought with this before too. I think I moved my stuff to the
    ItemDataBound event to make it happy.

    Greg

    "Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
    news:evW4%...
    > Hi! I'm so confused right now..
    >
    > I have a Page that load a datagrid with a a bunch of radiobuttons in three
    > columns which are then checkes or uncheck in the ItemCreated.(it's
    > supposed
    > to be a permission setting for different things in my application)
    > There is a save button on the page to save the permissions set in the
    > grid.
    >
    > The BindGrid() is called if it is NOT a postback in the PageLoad.
    >
    > Then, in debugging, when the User presses the Save button update the
    > permissions, for some reason.. the ItemCreated is breaking before I have
    > even gotten to the PageLoad... and in there the Radiobuttons are set so
    > that
    > the radiobutton for "no access" is checked, this means the selection of
    > Radiobuttons the user made is overwritten.
    >
    > THEN is goes to the PageLoad and THEN is updates the Permissions... thru
    > the
    > btnSave_Click()
    >
    > Why on Earth is the ItemCreated Happening before the PageLoad...??? I see
    > no
    > point in this and is there a way to stop it from happening?
    >
    > Best Regards/
    > Lars
    >
    >
     
    Greg Burns, Sep 10, 2004
    #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. Learning SQL Server

    Re: getting column value in ItemCreated datagrid event

    Learning SQL Server, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    552
    Learning SQL Server
    Aug 12, 2003
  2. Binny
    Replies:
    2
    Views:
    1,002
    Binny
    Dec 10, 2003
  3. Philippe Camus
    Replies:
    2
    Views:
    2,523
    Philippe Camus
    Mar 30, 2006
  4. NM
    Replies:
    6
    Views:
    481
    Default User
    Sep 20, 2006
  5. Stephen Miller

    Using the DataGrid's ItemCreated event on PostBack

    Stephen Miller, Mar 3, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    283
    Stephen Miller
    Mar 3, 2004
Loading...

Share This Page