Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. scrolling gridview using update panel

scrolling gridview using update panel

Scheduled Pinned Locked Moved ASP.NET
databasedesignsysadminhelpannouncement
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    haleemasher
    wrote on last edited by
    #1

    when i run this code it show errors like "Type.'sysem.web.UI.Updaatepnael' doesnot have a public property named 'div','gridview'.......etc" plz chk code if there is any error

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

    <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" ForeColor="#333333" GridLines="None" 
        onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
        onrowediting="gvCouponDetails\_RowEditing" 
        onrowupdating="gvCouponDetails\_RowUpdating" 
        style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#E3EAEB" />
        <Columns>
            <asp:CommandField ButtonType="Button" CancelText="C" 
                ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                ShowEditButton="true" UpdateText="U">
                <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
            </asp:CommandField>
            <asp:TemplateField HeaderText="Coupon Name">
                <ItemTemplate>
                    <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                        Width="100px" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                        DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Date">
                <ItemTemplate>
                    <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                        Width="65px" />
                </ItemTemplate>
                <EditItemTemplate>
    
    A S A M 4 Replies Last reply
    0
    • H haleemasher

      when i run this code it show errors like "Type.'sysem.web.UI.Updaatepnael' doesnot have a public property named 'div','gridview'.......etc" plz chk code if there is any error

      <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
      <asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>

      <asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

      <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
          CellPadding="4" ForeColor="#333333" GridLines="None" 
          onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
          onrowediting="gvCouponDetails\_RowEditing" 
          onrowupdating="gvCouponDetails\_RowUpdating" 
          style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
          <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
          <RowStyle BackColor="#E3EAEB" />
          <Columns>
              <asp:CommandField ButtonType="Button" CancelText="C" 
                  ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                  ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                  ShowEditButton="true" UpdateText="U">
                  <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
              </asp:CommandField>
              <asp:TemplateField HeaderText="Coupon Name">
                  <ItemTemplate>
                      <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                          Width="100px" />
                  </ItemTemplate>
                  <EditItemTemplate>
                      <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                          DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                  </EditItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="Date">
                  <ItemTemplate>
                      <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                          Width="65px" />
                  </ItemTemplate>
                  <EditItemTemplate>
      
      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      Enclose it in <ContentTemplate></ContentTemplate> :-D

      Arun Jacob http://codepronet.blogspot.com/

      1 Reply Last reply
      0
      • H haleemasher

        when i run this code it show errors like "Type.'sysem.web.UI.Updaatepnael' doesnot have a public property named 'div','gridview'.......etc" plz chk code if there is any error

        <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

        <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None" 
            onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
            onrowediting="gvCouponDetails\_RowEditing" 
            onrowupdating="gvCouponDetails\_RowUpdating" 
            style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#E3EAEB" />
            <Columns>
                <asp:CommandField ButtonType="Button" CancelText="C" 
                    ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                    ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                    ShowEditButton="true" UpdateText="U">
                    <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
                </asp:CommandField>
                <asp:TemplateField HeaderText="Coupon Name">
                    <ItemTemplate>
                        <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                            Width="100px" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                            DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Date">
                    <ItemTemplate>
                        <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                            Width="65px" />
                    </ItemTemplate>
                    <EditItemTemplate>
        
        S Offline
        S Offline
        sashidhar
        wrote on last edited by
        #3

        tHTS rIGHT wITH aRUN uSE fOLLOWING cODE

        <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate >
        <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

        <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None" 
            onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
            onrowediting="gvCouponDetails\_RowEditing" 
            onrowupdating="gvCouponDetails\_RowUpdating" 
            style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#E3EAEB" />
            <Columns>
                <asp:CommandField ButtonType="Button" CancelText="C" 
                    ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                    ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                    ShowEditButton="true" UpdateText="U">
                    <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
                </asp:CommandField>
                <asp:TemplateField HeaderText="Coupon Name">
                    <ItemTemplate>
                        <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                            Width="100px" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                            DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Date">
                    <ItemTemplate>
                        <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                            Width="65px" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="tbDate0" runat="server" Text='<%# Bind("Date") %>' 
                            Wi
        
        H 1 Reply Last reply
        0
        • H haleemasher

          when i run this code it show errors like "Type.'sysem.web.UI.Updaatepnael' doesnot have a public property named 'div','gridview'.......etc" plz chk code if there is any error

          <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
          <asp:ScriptManager ID="ScriptManager1" runat="server">
          </asp:ScriptManager>

          <asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

          <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
              CellPadding="4" ForeColor="#333333" GridLines="None" 
              onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
              onrowediting="gvCouponDetails\_RowEditing" 
              onrowupdating="gvCouponDetails\_RowUpdating" 
              style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
              <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
              <RowStyle BackColor="#E3EAEB" />
              <Columns>
                  <asp:CommandField ButtonType="Button" CancelText="C" 
                      ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                      ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                      ShowEditButton="true" UpdateText="U">
                      <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
                  </asp:CommandField>
                  <asp:TemplateField HeaderText="Coupon Name">
                      <ItemTemplate>
                          <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                              Width="100px" />
                      </ItemTemplate>
                      <EditItemTemplate>
                          <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                              DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                      </EditItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="Date">
                      <ItemTemplate>
                          <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                              Width="65px" />
                      </ItemTemplate>
                      <EditItemTemplate>
          
          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Here is one of my complete article, Maintain GridView Scroll Position and Header Inside Update Panel[^Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          1 Reply Last reply
          0
          • H haleemasher

            when i run this code it show errors like "Type.'sysem.web.UI.Updaatepnael' doesnot have a public property named 'div','gridview'.......etc" plz chk code if there is any error

            <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>

            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

            <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" ForeColor="#333333" GridLines="None" 
                onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
                onrowediting="gvCouponDetails\_RowEditing" 
                onrowupdating="gvCouponDetails\_RowUpdating" 
                style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
                <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#E3EAEB" />
                <Columns>
                    <asp:CommandField ButtonType="Button" CancelText="C" 
                        ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                        ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                        ShowEditButton="true" UpdateText="U">
                        <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
                    </asp:CommandField>
                    <asp:TemplateField HeaderText="Coupon Name">
                        <ItemTemplate>
                            <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                                Width="100px" />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                                DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Date">
                        <ItemTemplate>
                            <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                                Width="65px" />
                        </ItemTemplate>
                        <EditItemTemplate>
            
            M Offline
            M Offline
            Muhammad Mazhar
            wrote on last edited by
            #5

            You code is missing construct. Wrap every thing within your update panel in . For example net out put should be something like .................

            Share your experience with others Check my Blog...

            1 Reply Last reply
            0
            • S sashidhar

              tHTS rIGHT wITH aRUN uSE fOLLOWING cODE

              <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
              <asp:ScriptManager ID="ScriptManager1" runat="server">
              </asp:ScriptManager>

              <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate >
              <div id="divgrid" runat ="server" overflow:scroll style="position: absolute; width: 333px; height: 122px">

              <asp:GridView ID="gvCouponDetails0" runat="server" AutoGenerateColumns="False" 
                  CellPadding="4" ForeColor="#333333" GridLines="None" 
                  onrowcancelingedit="gvCouponDetails\_RowCancelingEdit" 
                  onrowediting="gvCouponDetails\_RowEditing" 
                  onrowupdating="gvCouponDetails\_RowUpdating" 
                  style="top: 519px; left: 285px; position: absolute; height: 143px; width: 575px; z-index: 1; margin-left: 0px; margin-top: 0px;">
                  <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                  <RowStyle BackColor="#E3EAEB" />
                  <Columns>
                      <asp:CommandField ButtonType="Button" CancelText="C" 
                          ControlStyle-Font-Size="10px" ControlStyle-ForeColor="Blue" 
                          ControlStyle-Width="15px" EditText="E" ShowCancelButton="true" 
                          ShowEditButton="true" UpdateText="U">
                          <ControlStyle Font-Size="10px" ForeColor="Blue" Width="15px" />
                      </asp:CommandField>
                      <asp:TemplateField HeaderText="Coupon Name">
                          <ItemTemplate>
                              <asp:Label ID="tbCouponName0" runat="server" Text='<%# Bind("CouponName") %>' 
                                  Width="100px" />
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:DropDownList ID="ddlCoupon0" runat="server" DataSourceID="DSCouponType" 
                                  DataTextField="CouponName" DataValueField="Coupon\_TypeID" Width="100px" />
                          </EditItemTemplate>
                      </asp:TemplateField>
                      <asp:TemplateField HeaderText="Date">
                          <ItemTemplate>
                              <asp:Label ID="lblDate0" runat="server" Text='<%# Bind("Date") %>' 
                                  Width="65px" />
                          </ItemTemplate>
                          <EditItemTemplate>
                              <asp:TextBox ID="tbDate0" runat="server" Text='<%# Bind("Date") %>' 
                                  Wi
              
              H Offline
              H Offline
              haleemasher
              wrote on last edited by
              #6

              there is no error the code u suggest but on run it not show gridview.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups