DDL into an EditItemTemplate

Discussion in 'ASP .Net' started by Fransis il Mulo, Dec 4, 2007.

  1. I need to populate (no databound control) a ddl when my GridView goes in
    Edit Mode. I put my ddl in the EditItemTemplate and then?
    During RowEditing GridView event ddl doesn't exist. When can i fill the
    ddl, if possible?

    Thanks in advance,

    Fransis
     
    Fransis il Mulo, Dec 4, 2007
    #1
    1. Advertising

  2. Fransis il Mulo

    Elmo Watson Guest

    If it's not databound - - you can just add the items manually at design
    time.
    Then, during the RowDatabound event of the Gridview, you can choose
    whichever item is relevant.

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "Fransis il Mulo" <> wrote in message
    news:47559e1c$0$37197$...
    >I need to populate (no databound control) a ddl when my GridView goes in
    >Edit Mode. I put my ddl in the EditItemTemplate and then?
    > During RowEditing GridView event ddl doesn't exist. When can i fill the
    > ddl, if possible?
    >
    > Thanks in advance,
    >
    > Fransis
     
    Elmo Watson, Dec 4, 2007
    #2
    1. Advertising

  3. Fransis il Mulo ha scritto:
    > I need to populate (no databound control) a ddl when my GridView goes in
    > Edit Mode. I put my ddl in the EditItemTemplate and then?
    > During RowEditing GridView event ddl doesn't exist. When can i fill the
    > ddl, if possible?
    >
    > Thanks in advance,
    >
    > Fransis


    Sorry but I have found the solution, so I post it:

    protected void ddl_Load(object sender, EventArgs e)
    {
    DropDownList ddl = (DropDownList)sender;
    ddl.Items.Add(...
    }


    Bye Fransis
     
    Fransis il Mulo, Dec 4, 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. huobazi

    Can NOt AutoPostBack for two DDL

    huobazi, Jul 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    507
    huobazi
    Jul 2, 2003
  2. Shane O. Pinnell

    Databound DDL in Datagrid using code-behind

    Shane O. Pinnell, Jul 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    385
    Shane O. Pinnell
    Jul 10, 2003
  3. Rob Wire
    Replies:
    5
    Views:
    494
    Yan-Hong Huang[MSFT]
    Aug 14, 2003
  4. Marina
    Replies:
    0
    Views:
    919
    Marina
    Aug 12, 2003
  5. VB Programmer
    Replies:
    2
    Views:
    574
    VB Programmer
    Apr 8, 2004
Loading...

Share This Page