现在我将数据库里得一个权限名字段绑定到Dropdownlist里,我数据库中有两个表 第一个表 就是员工表 里面有名字,密码,权限号字段,第二张表有权限号,和权限名字段,现在要求有编辑员工信息功能,就是能修改密码和权限,在DATAGRID中的DROPDOWNLIST中显示权限名,点编辑出现密码和权限名修改的文本框和选择框,选择修改的权限名,把相对应权限号改到员工表中 有例子的话直接加我QQ传给我342308059

解决方案 »

  1.   


                      <Columns>
                      <asp:TemplateColumn>
    <headertemplate> 状态 </headertemplate>
                        <itemtemplate> 
                          <asp:Label 
    Width="80" 
    Text='<%# DataBinder.Eval(Container.DataItem, "stuta").ToString().Trim() %>' 
    runat="server"/> </itemtemplate>
                        <edititemtemplate> 
                        
     <asp:DropDownList ID="stuta" runat="server"> 
       <asp:ListItem Value="0" Text=" " Selected="true"></asp:ListItem>
                            <asp:ListItem Value="1" Text="已进仓"></asp:ListItem>
                            <asp:ListItem Value="2" Text="海关二次放行"></asp:ListItem>
                            <asp:ListItem Value="3" Text="已提货"></asp:ListItem>
                          </asp:DropDownList>
                        </edititemtemplate>
                        <footertemplate>                  </asp:TemplateColumn>                   </Columns>