Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   UpdateCommand (http://www.velocityreviews.com/forums/t70649-updatecommand.html)

André Almeida Maldonado 01-15-2004 01:05 PM

UpdateCommand
 
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 01-15-2004 02:31 PM

Re: UpdateCommand
 
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" <deweb@bol.com.br> wrote in message
news:uNRV4g22DHA.2000@TK2MSFTNGP11.phx.gbl...
> 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??
>
>





All times are GMT. The time now is 07:46 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.