想请问下,我在gridview里面想启用插入的功能,其他的功能我都写好了,唯独插入的功能不知道哪出错了,怎么就是不出来,现在想请各位高手提供一下思路,最好能提供下源代码!谢谢!

解决方案 »

  1.   

    我是在每列的下边 加   <FooterTemplate/>  你发你的代码看看
      

  2.   


            <asp:gridview runat="server" ID="GridView1" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="5" ForeColor="#333333" 
                GridLines="None" onrowcancelingedit="GridView1_RowCancelingEdit" 
                onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                onrowupdating="GridView1_RowUpdating" DataKeyNames="me_id"
                Width="675px">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" 
                    VerticalAlign="Middle" />
                <Columns>
                    <asp:BoundField DataField="paixu" HeaderText="编号" ReadOnly="True"/>
                    <asp:BoundField DataField="biaoti" HeaderText="评分人员" />   
                    <asp:CommandField HeaderText="编辑 " ShowEditButton="True" />
                    <asp:TemplateField HeaderText="删除 " ShowHeader="False">
                         <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                CommandName="Delete" Text="删除" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    <asp:Button ID="btSend" Text="新建" runat="server" CommandName="EmptyInsert" UseSubmitBehavior="False" />
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#C8E4FF" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:gridview>这个是我没有动过的,动过的被我删掉了,你看看应该怎么加!帮忙下!
      

  3.   

    点击”新建“,显示FooterTemplate,其中有接收你要输入的内容的控件,完成后,点击保存,FooterTemplate隐藏,重新绑定就好