最近学习js脚本,觉得别的控件用手写的ajax调用没什么问题,但是gridview不会做

解决方案 »

  1.   

    不太明白楼主的意思。
    gridview提交是指gridview本身的事件进行更新删除操作吧?
    用updatepanel把gridview框住就行了。代码都不用写。
      

  2.   

         具体哪方面不会?   实现无刷新?
     
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                               <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                    CellPadding="4"  PageSize="3" >
                                          ......
                               </asp:GridView>
                    </ContentTemplate>
            </asp:UpdatePanel>
      

  3.   

    GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.
      

  4.   

    updatepanel中使用gridview
     <asp:UpdatePanel ID="uid"  runat="server">
                
                <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="userid" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
                                               </asp:GridView>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger    ControlID="Button1" />             </Triggers>
                  
            </asp:UpdatePanel>