Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6943555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:10:17+00:00 2026-05-27T13:10:17+00:00

I have a grid view with Textitem Template fields to insert Data into DB.By

  • 0

I have a grid view with Textitem Template fields to insert Data into DB.By default One row is loaded for Entry i want to add new row manullay from button click from user in grid view.
My code to make gridview is bellow

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowFooter="True">
            <Columns>
                <asp:TemplateField HeaderText="Card_no">
                    <ItemTemplate>
                        <asp:TextBox ID="txtCardNo" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Gross Wt">
                    <ItemTemplate>
                        <asp:TextBox ID="txtGrossWt" runat="server"></asp:TextBox>
                    </ItemTemplate>

                </asp:TemplateField>
            </Columns>
        </asp:GridView>

I used the following javascript function to do it but it only add row without text template

 var grd = document.getElementById('GridView1');
            var tbod=grd.rows[0].parentNode;
            var newRow=grd.rows[grd.rows.length - 1].cloneNode(true);
            tbod.appendChild(newRow);
            return false;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:10:18+00:00Added an answer on May 27, 2026 at 1:10 pm

    Generally utilize the footer row for this

    http://geekswithblogs.net/casualjim/archive/2006/05/04/77151.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a grid-view, which contains an asp image-button for deleting row, i want
I have a data grid view in one windows form named GridViewForm. When the
I have a grid view utilizing sql data source. Now I want to delete
I have a grid view control having some bound and template fields as follows
I have a grid view using bound, hyper link, and template fields. I'm trying
I have one grid view that contains some template columns. In this, the first
I have a Data Grid View inside a control that is displayed in a
i have a doubt in grid view. In Data list we have a property
I have a page with .Net grid view with about 12 text fields per
Is it possible to have something like Data Grid or Grid View control in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.