GridCalculatedColumn and footer total calculation

4 posts, 0 answers
  1. Venkatesh
    Venkatesh avatar
    88 posts
    Member since:
    Nov 2012

    Posted 16 Jan 2013 Link to this post

    Hi,

    I have 2 numeric textbox, gridcalculated column and footer column.
    Once the value is entered in the numeric textbox (something like onblur), i want to calculate the value for gridcalculated column and footer column. The lblTotalValue should have the total of the "GridCalculatedColumn".
    This is the UI which I have:

    <telerik:GridTemplateColumn UniqueName="OrderQuantity" HeaderText="Order Quantity" DataField="OrderQuantity">
                <EditItemTemplate>           
                    <telerik:RadNumericTextBox ID="txtOrderQuantity" runat="server" >
                    </telerik:RadNumericTextBox>                
                </EditItemTemplate>        
            </telerik:GridTemplateColumn>
      
            <telerik:GridTemplateColumn UniqueName="UnitPrice" HeaderText="Unit Price" DataField="UnitPrice">
                <EditItemTemplate>
                    <telerik:RadNumericTextBox ID="txtUnitPrice" runat="server" >
                    </telerik:RadNumericTextBox>              
                </EditItemTemplate>
                <FooterTemplate>
                <asp:Label ID="lblTotal" Text="Total: " runat="server"></asp:Label>
                <asp:Label ID="lblTotalValue" runat="server"></asp:Label>
                </FooterTemplate>  
            </telerik:GridTemplateColumn>
      
                <telerik:GridCalculatedColumn DataFormatString="{0:C}" DataType="System.Double" HeaderText="Extended Price"
                    UniqueName="ExtendedPrice" DataFields="OrderQuantity,UnitPrice" Expression="{0}*{1}"
                    Aggregate="Sum" Visible="true">                
                </telerik:GridCalculatedColumn>

    How to achieve this?
    Thanks
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 21 Jan 2013 Link to this post

    Hello,

    I suggest you go through the forum thread below which elaborates on similar subject:
    http://www.telerik.com/community/forums/aspnet/grid/radgrid-calculatedcolumn-based-on-templatecolumn.aspx

    Greetings,
    Pavlina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Koen
    Koen avatar
    7 posts
    Member since:
    Mar 2016

    Posted 21 Mar Link to this post

    That page no longer exists. Is there a similar solution somewhere?
Back to Top