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

Need a total cell

5 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kathryn
Top achievements
Rank 1
Kathryn asked on 29 May 2013, 08:22 PM
I am trying to have a total cell at the end of each row as described in post http://www.kendoui.com/forums/permalink/ZYoSEK-x_keMMJfogOHsSw

The suggestion listed works great.  However, as the post mentions, the totals don't get updated in real time (you need to sort or filter or do something else in order for the total field to get updated).  Is there a work around for this?  Thanks....

5 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 31 May 2013, 06:22 AM
Hi Kathryn,


In order to update the total column in real time, when a change is made in some of the other columns, you could bind to the save event of the Grid and update the model value for the column. For your convenience I prepared the following JS Bin example, which demonstrates this.

Please let me know if this was the information that you were looking for.

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kathryn
Top achievements
Rank 1
answered on 04 Jun 2013, 02:59 PM
That example was extremely helpful.... thank you!!
0
Accepted
Kathryn
Top achievements
Rank 1
answered on 04 Jun 2013, 06:04 PM
OK, I've tried implementing the code you shared into my project and I think I'm VERY close but it's still not updating the total in my model.  You can see it at...

http://jsbin.com/ukiloj/3/edit

Any help would be appreciated!  Thanks...
0
Kathryn
Top achievements
Rank 1
answered on 05 Jun 2013, 01:43 PM
I finally figured out the issue.  In my schema, my field was marked editable: false since I didn't want the user to be able to edit the value, but that also prevents the value from being edited programmatically.  I removed the editable: false and then added the editor function to the column and that will prevent the user from editing but the field can be updated programmatically.
0
Dimiter Madjarov
Telerik team
answered on 06 Jun 2013, 07:29 AM
Hello Kathryn,


Thanks for keeping me updated. I am glad that the example was helpful and you managed to solve the issue.

Do not hesitate to contact us again if you are experiencing any other problems. Have a nice day!

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Kathryn
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Kathryn
Top achievements
Rank 1
Share this question
or