D
Dave Mack
I have added a control in the headertemplate of a
datagrid. it's a dropdownlist control. What I want to
be able to do is populate that control based on some
data. My problem is that I can't access the control.
I tried:
DataGrid1.FindControl("frmpriority")
and
(DropDownList)DataGrid1.FindControl("frmpriority")
and
frmpriority (as if it were just a normal control outside
of the datagrid)
but those don't work, it simply cannot find the control.
How can I access the field:
code snippet:
<asp:templatecolumn>
<headertemplate>
Priority<br>
<asp:dropdownlist runat="server"
id="frmpriority"></asp:dropdownlist>
</headertemplate>
<itemtemplate>
Content
</itemtemplate>
</asp:templatecolumn>
thanks
datagrid. it's a dropdownlist control. What I want to
be able to do is populate that control based on some
data. My problem is that I can't access the control.
I tried:
DataGrid1.FindControl("frmpriority")
and
(DropDownList)DataGrid1.FindControl("frmpriority")
and
frmpriority (as if it were just a normal control outside
of the datagrid)
but those don't work, it simply cannot find the control.
How can I access the field:
code snippet:
<asp:templatecolumn>
<headertemplate>
Priority<br>
<asp:dropdownlist runat="server"
id="frmpriority"></asp:dropdownlist>
</headertemplate>
<itemtemplate>
Content
</itemtemplate>
</asp:templatecolumn>
thanks