I have a datagrid. The datagrid has a footer, and one of the columns in this footer is a dropdown list.
<asp:TemplateColumn>
... <FooterTemplate>
<asp
ropDownList ID="add_attribute"Runat="Server">
</asp
ropDownList>
</FooterTemplate>
</asp:TemplateColumn>
I am trying to bind this dropdown list to a column in the database
add_attribute.DataSource = ds.Tables[0];
add_attribute.DataTextField = ds.Tables[0].Columns["ss_attribute_name_c"].ColumnName.ToString();
add_attribute.DataValueField = ds.Tables[0].Columns["o_id"].ColumnName.ToString();
add_attribute.DataBind();
BUT I get the error that the add_attribute could not be found. I guess it is because it is a part of the datagrid.
How can I bind the dropdown within the datagrid with the column in the database?
Any suggestions?
Thank you,
Marika
<asp:TemplateColumn>
... <FooterTemplate>
<asp
</asp
</FooterTemplate>
</asp:TemplateColumn>
I am trying to bind this dropdown list to a column in the database
add_attribute.DataSource = ds.Tables[0];
add_attribute.DataTextField = ds.Tables[0].Columns["ss_attribute_name_c"].ColumnName.ToString();
add_attribute.DataValueField = ds.Tables[0].Columns["o_id"].ColumnName.ToString();
add_attribute.DataBind();
BUT I get the error that the add_attribute could not be found. I guess it is because it is a part of the datagrid.
How can I bind the dropdown within the datagrid with the column in the database?
Any suggestions?
Thank you,
Marika