Add a UNION statement to your SQL, then you don't have to bother with this.
You can combine "auto" load items and databound items in your ddl. We do it
here all the time. Save yourself a LOT of time.
"glenn" <> wrote in message
news:E1F0EAC4-F5B0-4EF1-A845-...
> Hi folks,
>
> Page_Load has the following definition:
> Sub Page_Load(sender as Object, e as EventArgs)
>
> As such, we are unable to instantiate a control that is inside a DataGrid
> since
> the e parameter is an EventArgs and not a DataGridCommandEventArgs type.
>
> If I have a ddl and I want to load items automatically as the page loads,
> how can I access the control from Page_Load.
>
> If the ddl was not in a DataGrid, I could simply write:
> Dim ddl as DropDownList = e.Item.Cells(1).FindControl("ddl")
>
> but this does not work when the ddl is inside a DataGrid.
>
> Thanks for any replies,
> glenn
>
|