Click here to Skip to main content
14,738,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need some help on how to do some calculations in a gridview.
I have a rate column and a number column that is a textbox.
I would like to multiply the rate column by the textbox to make the totals column.

    <form id="form1" runat="server">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 

                <asp:BoundField DataField="Description" HeaderText="Description" 

                    SortExpression="Description" />
                <asp:BoundField DataField="Rate" HeaderText="Rate" SortExpression="Rate"/>
                <asp:TemplateField HeaderText="Number">
                    <asp:TextBox runat="server">
                <asp:TemplateField HeaderText="Total">
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 


            SelectCommand="SELECT [Description], [Rate] FROM [grid]">
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />

Please help.

thatraja 18-Jan-12 3:32am
5! BTW you know GIT?
Prasad_Kulkarni 18-Jan-12 6:08am
till now i wasn't..but now yes i know:)
thank you
thatraja 18-Jan-12 6:12am
You too welcome there
Prasad_Kulkarni 18-Jan-12 6:15am
thanks man,you r really a nice person. srinivas is d lucky charm he owned you.
thatraja 23-Jan-12 9:06am
Thank you, BTW be active there, that forum is for Indian people
thatraja 18-Jan-12 3:33am
5! BTW you know GIT?
Anuja Pawar Indore 18-Jan-12 3:38am
Nope, just saw the link :)
thatraja 18-Jan-12 3:44am
You welcome there
Anuja Pawar Indore 18-Jan-12 4:22am
Yup added. Thanks for sharing :)
thatraja 23-Jan-12 9:07am
Welcome, keep posting there, that forum is for Indian people

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900