我有问题在数据视图分区的详细视图(在编辑模式下)显示下拉列表,这里是代码:
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="4" DataKeyNames="ENumber" DataSourceID="SqlDataSource5" ForeColor="#333333" GridLines="None" Height="50px" Width="125px" OnItemUpdated="DetailsView1_ItemUpdated" OnPageIndexChanging="DetailsView1_PageIndexChanging" >
<AlternatingRowStyle BackColor="White" />
<CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
<EditRowStyle BackColor="#2461BF" />
<FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
<Fields>
<asp:BoundField DataField="ENumber" HeaderText="ENumber" ReadOnly="True" SortExpression="ENumber" />
<asp:BoundField DataField="UserName" HeaderText="UserName" SortExpression="UserName" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:TemplateField HeaderText="Division">
<ItemTemplate>
<%#Eval("Division") %>
</ItemTemplate>
&#39; RUNAT =&#34;服务器&#34; /&GT;
</asp:TemplateField>
<asp:BoundField DataField="Division" HeaderText="Division" SortExpression="Division" />
<asp:CommandField ButtonType="Button" ShowEditButton="True" ControlStyle-CssClass="btn btn-primary" />
</Fields>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
</asp:DetailsView>
这里是下拉列表的SQL数据源:
<asp:SqlDataSource ID="FindDivisionDataSource" ConnectionString="<%$ ConnectionStrings:QMS_PanasonicConnectionString %>" SelectCommand="Select Code_ID,Code_Desc FROM T_Master_Setup where Master_Code_ID = 'CD001'" runat="server" />
任何想法?