M mystudy Unregistered / Unconfirmed GUEST, unregistred user! 2009-11-03 #2 要用模板的<asp:TemplateField HeaderText="是否启用"> <EditItemTemplate> <aspropDownList ID="ddlist_InUser" runat="server" SelectedValue='<%#GetInUser(Eval("InUser")) %>'> <asp:ListItem>是</asp:ListItem> <asp:ListItem>否</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Lab_InUser" runat="server" Text='<%# GetInUser(Eval("InUser")) %>'></asp:Label> </ItemTemplate> <ItemStyle Width="80px" /> </asp:TemplateField>
要用模板的<asp:TemplateField HeaderText="是否启用"> <EditItemTemplate> <aspropDownList ID="ddlist_InUser" runat="server" SelectedValue='<%#GetInUser(Eval("InUser")) %>'> <asp:ListItem>是</asp:ListItem> <asp:ListItem>否</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Lab_InUser" runat="server" Text='<%# GetInUser(Eval("InUser")) %>'></asp:Label> </ItemTemplate> <ItemStyle Width="80px" /> </asp:TemplateField>