I need to set a value to a cell ("TotalCol") when user uncheck another cell ("UseCol") in the same row. I am using GridEditMode.Row. How to do it? I don't want to force user to change focus to another row or cell to make it work. Thanks.
By the way, everything should be recorded in the transactionlog! ;)
Hello,
If your setCellValue call would normally be something like this:
$("#grid1").igGridUpdating("setCellValue", rowId, colKey, "NEW VALUE");
The workaround will look like this:
$("#grid1").data("igGrid").dataSource.setCellValue(rowId, colKey, "NEW VALUE", true); $("#grid1").igGrid("cellById", rowId, colKey).text("NEW VALUE");
What it would do is call the data source method equivalent to Updating's one, however, it only updates the data source and you'll have to fill in the new value for the cell with the second call. The last parameter controls whether the transaction should be committed or not. If your configuration doesn't have auto commit enabled you may also need to add the modified record style to the cell's row. In addition, if you are trying to update a cell with templating or formatting enabled, you'll have to pass the value through the template or formatter. Please, let me know if this is the case so I can help you with it!
More information about the functions used in the workaround can be found here and here.
Best regards,
Stamen Stoychev
Hi Stamen,
Thanks for your reply. I' m still newbie in igGrid. Can you provide sample code for this setCellValue workaround?
Thanks
In the latest SR for 2015.1 setCellValue will throw this error incorrectly when the value you are trying to update is null. This has since been resolved and the fix will be available in the next SR. As a workaround you could instead use the setCellValue method of the grid's data source instance and update the cell contents directly.
I hope this helps! Please, let me know if you have any other questions or concerns!
Hi,
I also face this error Uncaught Error: The specified record or property was not found in the data source when set value with javascript version 2015.1
<script src="http://cdn-na.infragistics.com/igniteui/2015.1/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2015.1/latest/js/infragistics.lob.js"></script>
but no error and able to setValue with javascript version 20132
<script src="http://cdn-na.infragistics.com/jquery/20132/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/jquery/20132/latest/js/infragistics.lob.js">
Can help to check why latest version of javascript is not working?
By the way, this is the error message I got with your code:
Uncaught Error: The specified record or property was not found in the data source.infragistics.lob.js:485 $.widget.setCellValuejquery-ui.min.js:5 (anonymous function)jquery-ui.min.js:5 (anonymous function)jquery-1.9.1.min.js:3 b.extend.eachjquery-1.9.1.min.js:3 b.fn.b.eachjquery-ui.min.js:5 t.widget.bridge.t.fn.(anonymous function)test.html:49 (anonymous function)