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. Inserting Empty Row in Grid View in ASP Dot net + vb dot net

Inserting Empty Row in Grid View in ASP Dot net + vb dot net

Scheduled Pinned Locked Moved ASP.NET
csshelpquestion
7 Posts 6 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.
  • T Offline
    T Offline
    Tufail Ahmad
    wrote on last edited by
    #1

    How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

    V N A D S 5 Replies Last reply
    0
    • T Tufail Ahmad

      How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

      V Offline
      V Offline
      vinodkrebc
      wrote on last edited by
      #2

      You can add your code on GridView databound event ..

      Vinod Kumar Prajapati Software Engineer EBC Publishing Pvt. Ltd.

      T 1 Reply Last reply
      0
      • V vinodkrebc

        You can add your code on GridView databound event ..

        Vinod Kumar Prajapati Software Engineer EBC Publishing Pvt. Ltd.

        T Offline
        T Offline
        Tufail Ahmad
        wrote on last edited by
        #3

        Send me source code please

        1 Reply Last reply
        0
        • T Tufail Ahmad

          How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

          N Offline
          N Offline
          nagendrathecoder
          wrote on last edited by
          #4

          You can use ItemTemplate og GridView for inserting rows. Use Label controls in that. When you want to add empty row, add empty labels to it and later you can assign text to that row. :)

          1 Reply Last reply
          0
          • T Tufail Ahmad

            How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            Yes .. You can do this. Just follow these simple steps mentioned here : Add New Row in DataGrid[^] Hope you like my solution. :rose:

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Windows7 API Code Pack
            Simplify Code Using NDepend
            Basics of Bing Search API using .NET

            1 Reply Last reply
            0
            • T Tufail Ahmad

              How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

              D Offline
              D Offline
              dongavipul
              wrote on last edited by
              #6

              Hi, for that you can add footer template in your grid view and take rowdatbound event of the gridview at server side. in the rowdatbound event you can check each row this way protected void GVLeavelist_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { // Fetch each row here and calculate the data ViewState["Total"] = 'Your Value'; } else if((e.Row.RowType == DataControlRowType.Footer) { // then used viewstate value to display the total } }

              1 Reply Last reply
              0
              • T Tufail Ahmad

                How can i add empty row in Grid View in ASP dot net using VB Dot net. All fields are bound but i want to count TOTAL manually. e.g Type Col1 col2 col3 1 10 20 30 2 5 1 5 3 1 5 2 Total 16 26 37 Help please

                S Offline
                S Offline
                satalaj
                wrote on last edited by
                #7

                Hi, You can make the footer visible and bound your Fields there in Footer http://www.revenmerchantservices.com/page/gridview-add-new-row.aspx[^] Satalaj

                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