Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ASP.NET
<asp:GridView ID="GridView1" runat="server" ShowHeaderWhenEmpty="true" 
            BorderWidth="3px" CellPadding="2" BorderStyle="Groove"
            
            style="z-index: 1; left: 300px; top: 59px; position: absolute; height: 154px; width: 755px; text-align: center;" 
            CellSpacing="1" AutoGenerateColumns="False" GridLines="None">


             <Columns>


ASP.NET
<asp:BoundField DataField="Rate" HeaderText="Rate" ReadOnly="True" />
                        <asp:BoundField DataField="Qty" HeaderText="Qty" ReadOnly="True" />
                        <asp:TemplateField HeaderText="Total Point">
        <ItemTemplate>
       <asp:GridView1.Rows[i].Cells[10].Text = Convert.ToString(Convert.ToDecimal(GridView1.Rows[i].Cells[7].Text) * Convert.ToDecimal(GridView1.Rows[i].Cells[9].Text)); ReadOnly="True"/>
         </ItemTemplate>
       </asp:TemplateField>
                        <asp:BoundField DataField="Observaciones" HeaderText="Observation" ReadOnly="True" />
                        <asp:BoundField DataField="Date" HeaderText="Additional Date" ReadOnly="True" />


<emptydatatemplate>No Record Available


<rowstyle backcolor="#EFF3FB" horizontalalign="Center">
<footerstyle backcolor="#507CD1" font-bold="True" forecolor="White">
<pagerstyle backcolor="#2461BF" forecolor="White" horizontalalign="Center">
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" Width="500px"/>
<alternatingrowstyle backcolor="White">




What I have tried:

These are my code.i try many times but not succeeded.Plz help.
Posted
Updated 22-Nov-16 3:12am

Seems to be fairly simple using binder expressions <%# Eval("ColumnNam"). Plz do following steps by

remove all code from <itemptemplate>

then put this

<itemtemplate>
    <%# (Convert.ToDouble(Eval("Rate")) * Convert.ToDouble(Eval("Qty")))  %>
</itemtemplate>
 
Share this answer
 

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