现在,我有一个名为“PROCESS_FLAG”的数据库字段,其中包含文本值(A、I、E、C),我希望能够根据 PROCESS_FLAG 的值和我更改下拉列表列的默认选择值'不知道从这里去哪里。
这是我拥有的 GridView 的代码:
<asp:BoundField DataField="REQUESTQTY" HeaderText="Request Quantity"
SortExpression="REQUESTQTY" />
<asp:BoundField DataField="MOVEFROM" HeaderText="Move From"
SortExpression="MOVEFROM" />
<asp:BoundField DataField="MOVETO" HeaderText="Move To"
SortExpression="MOVETO" />
<asp:BoundField DataField="COMPLETEDBY" HeaderText="Completed By"
SortExpression="COMPLETEDBY" Visible="false"/>
<asp:BoundField DataField="COMPLETION_DATE" HeaderText="Completion Date"
SortExpression="COMPLETION_DATE" />
<asp:BoundField DataField="COMMENTS" HeaderText="Comments"
SortExpression="COMMENTS" Visible="false" />
<asp:BoundField DataField="RESPONSETIME" HeaderText="Response Time"
SortExpression="RESPONSETIME" Visible="false" />
<asp:BoundField DataField="PROCESS_FLAG" HeaderText="Process Flag"
SortExpression="PROCESS_FLAG" />
<asp:BoundField DataField="UNIQUEKEY" HeaderText="Unique Key"
SortExpression="UNIQUEKEY" Visible="true" />
<asp:TemplateField HeaderText="Send To...">
<ItemTemplate>
<asp:DropDownList ID="StatusDD" runat="server" AutoPostBack="false" OnSelectedIndexChanged="StatusDD_SelectedIndexChanged">
<asp:ListItem Value="A">Active</asp:ListItem>
<asp:ListItem Value="C">Complete</asp:ListItem>
<asp:ListItem Value="I">In Process</asp:ListItem>
<asp:ListItem Value="E">Error</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
我想根据 PROCESS_FLAG 的值设置下拉列表的默认选择值。
对此的任何帮助将不胜感激。我根本不是 Eval 功能的专家。
谢谢!