如题...

解决方案 »

  1.   

    我这是gridview中的,自己改改
    页面代码例: <asp:TemplateField HeaderText="品牌">
                                                        <EditItemTemplate>
                                                            <asp:DropDownList ID="DropDownList4" runat="server" DataSource='<%#ddlBind()%>' DataTextField='brand' DataValueField='id' Width="70px">
                                                                <asp:ListItem Value="00">-请选择-</asp:ListItem>
                                                            </asp:DropDownList>
                                                            </EditItemTemplate>
                                                        <ItemTemplate>CS文件中的 public DataSet ddlBind()  //注意public
        {
            DataSet ds = Pro.selctAllType2(com);//这里查询你要的数据
            return ds;
        }