This is a migrated thread and some comments may be shown as answers.

[Solved] Setting FooterText via Client Side

3 Answers 230 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 1
Naresh asked on 24 Apr 2009, 01:55 AM
Hello,

We have a shopping card grid with client side check boxes for row selection. Is there a way to reference the FooterText property of the Price column to show the total purchase amount?

I have the code working to sum the price of the selected rows. I just need to be able to dynamically update the total in the footer on the client side. I have looked at the numeric text box example but that does not really fit this situation.

Thanks,
Brian

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Apr 2009, 07:11 AM
Hi Brian,

I found forum threads which discusses similar scenario. Please go through the forum links and see whether it helps.
get_masterTableViewFooter()
http://www.telerik.com/community/forums/aspnet-ajax/grid/client-side-databind-does-not-update-aggregates.aspx

Thanks,
Shinu.
0
Daniel
Telerik team
answered on 24 Apr 2009, 07:32 AM
Hello Brian,

Please note that get_masterTableViewFooter() method, suggested by Shinu works with Static Headers and Scrolling only. To reach the Footer in other scenarios you could use the following approach:
var masterTable = $find("<%= RadGrid1.ClientID%>").get_masterTableView(); 
var footer = masterTable.get_element().getElementsByTagName("TFOOT")[0]; 
footer.rows[0]... 

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Naresh
Top achievements
Rank 1
answered on 24 Apr 2009, 01:29 PM
Daniel,

That did the trick! Thanks for the help and the extremely fast response.

Solution: 

 

var masterTable = $find("<%= RadGrid1.ClientID%>").get_masterTableView(); 
var footer = masterTable.get_element().getElementsByTagName("TFOOT")[0]; 

footer.rows[0].cells[2].innerHTML = formatCurrency(totalAmount);


Brian
Tags
Grid
Asked by
Naresh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Daniel
Telerik team
Naresh
Top achievements
Rank 1
Share this question
or