Datagrid footer bound dropdownlist

Discussion in 'ASP .Net' started by Mohamed Zaki, Jun 15, 2004.

  1. Mohamed Zaki

    Mohamed Zaki Guest

    Dear All,
    I've a datagrid in its footer i added a drop down list and some text
    boxes and a link button to add new records in the database, however i
    populate the dropdown list in the ItemDataBind, when i click over the
    linkbutton i got the dropdown list populated again and the selected item is
    lost.

    Please help.

    Regards,
    Mohamed
     
    Mohamed Zaki, Jun 15, 2004
    #1
    1. Advertising

  2. I'd suggest you to poulate the dropdownlist if e.item.itemtype =
    listitemtype.footer AND !BtnVarClicked
    BtnVarClicked is variable that is stored in the session object and is false
    when you enter in the itemdatabound when is ispostback and when you submit
    the page BUT not from the button in the footer
    in the footer onclick item initialize this variable to true

    Hope this helps
    Regards
    Martin

    "Mohamed Zaki" <> wrote in message
    news:...
    > Dear All,
    > I've a datagrid in its footer i added a drop down list and some text
    > boxes and a link button to add new records in the database, however i
    > populate the dropdown list in the ItemDataBind, when i click over the
    > linkbutton i got the dropdown list populated again and the selected item

    is
    > lost.
    >
    > Please help.
    >
    > Regards,
    > Mohamed
    >
    >
    >
     
    Martin Marinov, Jun 15, 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. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: Datagrid footer bound dropdownlist

    Phil Winstanley [Microsoft MVP ASP.NET], Jun 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    Mohamed Zaki
    Jun 16, 2004
  2. ibiza
    Replies:
    2
    Views:
    4,574
    Edwin Knoppert
    Jan 25, 2006
  3. Guest
    Replies:
    0
    Views:
    466
    Guest
    Nov 8, 2007
  4. Kim

    dropdownlist in footer of datagrid

    Kim, Oct 4, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    132
  5. Henrik
    Replies:
    1
    Views:
    461
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page