UpdateCommand

Discussion in 'ASP .Net' started by André Almeida Maldonado, Jan 15, 2004.

  1. Hy all...

    I'm trying to get the selectedvalue of a dropdownlist that is in a datagrid
    edititem...

    But, in this line:

    Dim drpPediGrPr As System.Web.UI.webcontrols.DropDownList =
    CType(e.Item.Cells(1).Controls(0), System.Web.UI.webcontrols.DropDownList)

    I receive this error:
    Specified conversion is not valid.

    Why??
     
    André Almeida Maldonado, Jan 15, 2004
    #1
    1. Advertising

  2. Apparently, e.Item.Cells(1).Controls(0) is NOT a DropDownList.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "André Almeida Maldonado" <> wrote in message
    news:...
    > Hy all...
    >
    > I'm trying to get the selectedvalue of a dropdownlist that is in a

    datagrid
    > edititem...
    >
    > But, in this line:
    >
    > Dim drpPediGrPr As System.Web.UI.webcontrols.DropDownList =
    > CType(e.Item.Cells(1).Controls(0), System.Web.UI.webcontrols.DropDownList)
    >
    > I receive this error:
    > Specified conversion is not valid.
    >
    > Why??
    >
    >
     
    Kevin Spencer, Jan 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. Mark

    UpdateCommand with Datalist

    Mark, Jul 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,447
  2. dawn
    Replies:
    1
    Views:
    494
    Daniel Bass
    Jul 28, 2003
  3. Learning SQL Server
    Replies:
    2
    Views:
    2,518
    Learning SQL Server
    Aug 7, 2003
  4. srathin

    DataGrid1 UpdateCommand calling DataGrid2 UpdateCommand

    srathin, Apr 9, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    191
    srathin
    Apr 9, 2005
  5. srathin

    DataGrid1 UpdateCommand calling DataGrid2 UpdateCommand

    srathin, Apr 9, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    175
    srathin
    Apr 11, 2005
Loading...

Share This Page