Sum Footer in RadGrid

2 posts, 0 answers
  1. Amanda
    Amanda avatar
    65 posts
    Member since:
    Sep 2010

    Posted 05 Nov 2010 Link to this post

    Okay - I am updating a textbox named txtRequested which is then updating a textbox named txtVariance in the same row.  When txtVariance is changed the OnChangeValue is fired and I need to now update the footer with the new value.  footer = footer + newValue.  How can I do this in javascript? 

    This is the code I am using to get the variance:



    Variance(sender, args)




    var rdgrid = $find("<%=RadGrid1.ClientID %>");



    var cell = sender.get_element().parentNode.parentNode;



    var index = cell.parentNode.rowIndex;



    var MasterTable = rdgrid.get_masterTableView();



    var row = MasterTable.get_dataItems()[index - 2]; //getting row



    var tbxAdopted = row.findControl("tbxAdopted").get_value(); //getting value of TextBox 'tbxAdopted'



    var tbxReq = row.findControl("tbxReq").get_value();



    var Variance = tbxReq - tbxAdopted;



    var tbxVariance = MasterTable.get_dataItems()[index - 2].findControl("tbxVar");




    this gets the value of the textbox changed in the variance column:




    newInput = 0.0;



    function VarianceTotal(sender, args) {


    newInput = sender.get_value();


    Thanks for your help.

  2. Tsvetoslav
    Tsvetoslav avatar
    1823 posts

    Posted 10 Nov 2010 Link to this post

    Hi Amanda,

    Thank you for contacting us and for your question.

    Please, take a look at the following online example - it should give you directions as to how to achieve your own scenario.

    Hope this information will prove helpful. 

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top