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

Sum in footer

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Princia
Top achievements
Rank 1
Princia asked on 02 Dec 2011, 08:57 AM
Hi...all

I am using Radgrid.In one of column in i have drodown.Depeding on the selection in the dropdown ,the values in other column(I used text box inside the column to dispaly integer values ,these integer values change  with drop down selection).I want to find the sum of integer ,as soosn as the values in the text box are changed.how to do it.

Thanks
Prencia

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 06 Dec 2011, 11:31 AM
Hello Prencia,

One way to achieve your goal is to use the built-in aggregate functions of RadGrid columns. More information about them could be find in this help topic and in this online demo.

If this approach is not applicable in your scenario, or you have some custom requirements you could try it different way:

  • Find the footer item for the respective column and in its cell to set the calculated value.
  • To calculate the value you need to iterate through the Items collection and for each item to get the value for the required column.

This whole logic should be done either in the SelectedIndexChanged event of the DropDown control or in the PreRender event of RadGrid.


Kind regards,
Andrey
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
Tags
General Discussions
Asked by
Princia
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or