whenever you have control within a control's item/alternate-item template you can't access control directly
you need to extract inner control by using method FindControl() with main control.
i.e.
in your case it will be like this
DropDownList list = (DropDownList) myGrid.FindControl("ddlName");
list.DataSource = dt;
list.DataBind();