CalculatedColumn works fine in first inquiry. But when grid in Batch Editing mode, the Calculated Column in Client side has no mechanism to automatically calculate. I try to update total price cell by java code, but I found there is no way to find the element.
Please kindly help me to implement this.
With best regards
12 Answers, 1 is accepted
Please try the following code snippet.I was able to get the changes made to the columns be reflected on the calculated column automatically when the values are changed and saved.
thank you for your help. it seems by your code, the calculated column only has been updated after saved, can I get it updated in client side before saved? so the customer can review the total price before saved.
I intercept the client events OnBatchEditSetCellValue="SetCellValue"
but in SetCellValue , I couldn't find the cell of "Total Price"
I'd tried many ways to get the cell, above code is failure on get total price cell. Is there any API document for these functions?
PS: I don't need update total price to db, like your code. I just want the interface friendly.
thank you very much.
With best regards
I am sorry to say but the current implementation of the batch editing functionality does not support modifying the value in the calculated column before an update in the database. However you could log this as a feature request in our feedback portal and if it gets popular enough we might consider including it in a future release.
For now this is achievable by manually calculating the value and placing it in the HTML. A sample demonstration on how to achieve this can be observed in the attached website.
Thank you for your help. This demo helps a lot.
Meanwhile, align attributions are missing from new row inserted in Batch Editing mode.
Do you mean that the editors in the new records are not aligned properly? The was such an issue when some of the columns were hidden by setting Display="False". However this problem is already fixed and if you download the latest internal build you should not experience such behavior.
My company business requires this feature too. In fact, I'm currently writing a general solution to this problem.
Was this feature requested on the feedback portal? If so, please provide me with the issue link to upvote it.
I researched our feedback portal but was unable to find a feature request for the mentioned functionality. For now you can follow the approach demonstrated in the below attached project.
Still the feature is not available in Kendo?
I am using Kendo UI for ASP.Net MVC.
I've been following the example attached by Angel and have run into three issues with the code below.
1) Decimal values in Fee are ignored. So a 4.08 fee x 1 UnitsSold = 4.00 SoldFee
2) Values greater than 999 in UnitsSold are formatted with a comma and calculations result in a NaN.
You can use the approach demonstrated in the following article to achieve this requirement:
Alternatively, you can also use another approach as demonstrated in the attached web site sample.
I hope this will prove helpful.
Please look at my point #3 again: "The calculated WeightSold column can be overriden by the user and so
My code follows the approach in the article you pointed out but the article does not have have the same scenario and won't encounter the same issue. That is, the calculated column is also editable and thus has an EditItemTemplate,
You can resolve this using the following approach:
Once the calculation is ready and you will set it to the numBox cell, you can use one of these instead of changing the html of the cell:
1. If you are using Cell type batch editing and the numbox cell is not currently opened, you can use the changeCellValue method by the dedicated Batch API:
2. If you are using Row type batch editing and the numbox cell is currently opened, you can access the RadNumericTextBox Telerik object and use the numBox.set_value(calculatedValue) approach. You can find it using the findControl method:
That should do the trick. If there are any remaining issues, you can open a formal support ticket to send us your grid configuration.