S
swethasivaram
Hi all
I am displaying some information from my database using DetailsView
which is bound to SqlDataSource1.
<asp
etailsView ID="DetailsView1" runat="server"
AutoGenerateRows="False" DataSourceID="SqlDataSource1"
ForeColor="#333333" >
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [x], [y], [z], [a], , [c] FROM [sometable]
WHERE ([ID] = @ID)"> />
When I allow editing of this information, I want to populate certain
dropdownlists in the DetailsView using different datasources. Is this
possible?
Specifically:
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='<%# Bind("someField")
%>'></asp:Label><br />
</ItemTemplate>
<EditItemTemplate>
<asp
ropDownList ID="ddl" runat="server" </asp
ropDownList><br />
</EditItemTemplate>
The ListItems for this DropDownList need to come from another database
table, not the same one to which it is bound in the ItemTemplate.
Is this possible at all?
Thanks!
I am displaying some information from my database using DetailsView
which is bound to SqlDataSource1.
<asp
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
AutoGenerateRows="False" DataSourceID="SqlDataSource1"
ForeColor="#333333" >
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [x], [y], [z], [a], , [c] FROM [sometable]
WHERE ([ID] = @ID)"> />
When I allow editing of this information, I want to populate certain
dropdownlists in the DetailsView using different datasources. Is this
possible?
Specifically:
<ItemTemplate>
<asp:Label ID="lbl" runat="server" Text='<%# Bind("someField")
%>'></asp:Label><br />
</ItemTemplate>
<EditItemTemplate>
<asp
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
</EditItemTemplate>
The ListItems for this DropDownList need to come from another database
table, not the same one to which it is bound in the ItemTemplate.
Is this possible at all?
Thanks!