Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 10, 2012 05:47 AM by aoshi_kh
Contributor
6445 Points
1187 Posts
Apr 09, 2012 12:59 PM|LINK
If you place your DropDownList inside a TemplateField you can certainly bind it to a SqlDataSource:
<asp:Gridview....> <asp:TemplateField HeaderText="Dropdownlist column"> <EditItemTemplate> <asp:DropDownList ID=".." DataSourceID="".... /> </EditItemTemplate> ... </asp:TemplateField> ... </asp:GridView>
Member
123 Points
331 Posts
Apr 09, 2012 11:58 PM|LINK
getting message show that 'the active schema does not support the element 'asp:sqldatasource', do you know how to resolve this issue?
Apr 10, 2012 12:01 AM|LINK
and also getting message show 'Could not find any attribute 'datasourceId' of element 'dropdownlist'
Apr 10, 2012 12:46 AM|LINK
is this related to i using asp:datagrid? if so, do you know how to set if i using asp:datagrid??
Apr 10, 2012 05:47 AM|LINK
I have solve all issue, by declare the another datasource in coding page, then bind in the datagrid when edit button is click.
mm10
Contributor
6445 Points
1187 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 09, 2012 12:59 PM|LINK
If you place your DropDownList inside a TemplateField you can certainly bind it to a SqlDataSource:
<asp:Gridview....>
<asp:TemplateField HeaderText="Dropdownlist column">
<EditItemTemplate>
<asp:DropDownList ID=".." DataSourceID="".... />
</EditItemTemplate>
...
</asp:TemplateField>
...
</asp:GridView>
aoshi_kh
Member
123 Points
331 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 09, 2012 11:58 PM|LINK
getting message show that 'the active schema does not support the element 'asp:sqldatasource', do you know how to resolve this issue?
aoshi_kh
Member
123 Points
331 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 10, 2012 12:01 AM|LINK
and also getting message show 'Could not find any attribute 'datasourceId' of element 'dropdownlist'
aoshi_kh
Member
123 Points
331 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 10, 2012 12:46 AM|LINK
is this related to i using asp:datagrid? if so, do you know how to set if i using asp:datagrid??
aoshi_kh
Member
123 Points
331 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 10, 2012 05:47 AM|LINK
I have solve all issue, by declare the another datasource in coding page, then bind in the datagrid when edit button is click.