Ok, I thing my first advice was not correct.
Since the ddl is inside the header, you need to call the FindControl method
on the item representing the header.
dgUsers.FindControl("ddlAccount") is obviously not good because it doesn't
get inside any item.
dgUsers.Items(1).FindControl("ddlAccount") is not good either because Items
collection doesn't include the header item.
You can catch the header item in either ItemCreated or ItemDataBound event.
Use ItemType property to tell the header item. Once you have got the item,
call FindControl("ddlAccount") on the item instance.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
NerdRunner said:
I have tried populating the drop lists on the Page_Load event, but I am
unable to get the drop list control. I am using
dgUsers.FindControl("ddlAccount") and it is not finding the control. I
have also tried dgUsers.Items(1).FindControl("ddlAccount") without any
luck.
Sean M. Severson
Eliyahu Goldin wrote:
In the Page_Load event.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
Hello group,
I am using a data grid with template columns. I have a drop list in
the header of the template column that will allow users to select a
value for filtering of the data in the grid. When would I
populate
the
drop list?
Sean M. Severson