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

  • SEARCH
  • Home
  • 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 6963913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:51:23+00:00 2026-05-27T15:51:23+00:00

I have a grid view with three columns and five rows with text item

  • 0

I have a grid view with three columns and five rows with text item item template fields for Inserting data on runtime to DB using Gridview.and i want to make some calculations with this grid view like addition of Column of Col1 and Col2 in 3rd column and also Sum of Col1 in footer.And also i want to make calculation as text changes in textboxes with out postback or page refresh.Please tell me how can i do this.
I have following code to make grid view

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" ShowFooter="True">
            <Columns>
                <asp:TemplateField HeaderText="One">
                    <FooterTemplate>
                        <asp:Label ID="lblOne_tot" runat="server"></asp:Label>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Two">
                    <FooterTemplate>
                        <asp:Label ID="lblTwo_tot" runat="server"></asp:Label>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Total">
                    <ItemTemplate>
                        <asp:Label ID="lblTotal" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
  • 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-27T15:51:24+00:00Added an answer on May 27, 2026 at 3:51 pm

    Add an “onChange” event on each of your text boxes that calls a JavaScript function. Inside this function, do your calculations and update the proper label/div/span/etc.

    <script language="javascript">
    function doCalculations1(whichControl)
    {
       //do calculations on whichControl.value
       var outputValue = whichControl.value * 5;
       //replace lblOne_tot with clientID after page is built
       document.getElementById("lblOne_tot").value = outputValue;
    }
    </script>
    
    <asp:TextBox id="TextBox1" runat="server" onchange="javascript:doCalculations1(this);" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page with .Net grid view with about 12 text fields per
I have grid view with three column name, rate, category I am also using
Is it possible to have a grid view with 2 columns and 3 rows
i have this line of code in my view using the Telerik Grid: columns.Bound(o
I am using vb.net code. I have grid view, please see the code below:
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
Is it possible to have something like Data Grid or Grid View control in
I have a grid view that is data bound to a dataset. In a
I have a grid view with a nested text box in it. I would

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.