jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid Cell Editing
Tagged: datagrid
This topic contains 5 replies, has 2 voices, and was last updated by dev_pepper 11 years, 5 months ago.
-
AuthorGrid Cell Editing Posts
-
Hi
I am facing an issue with jqwidgets grid cell editing.
I can’t replace edited cell value with another value.
The “setcellvalue” method doesn’t accept any arguments,if i want to update edited cell with a new value.
My requirement is ,
At first cell edit sum = oldCellVal+ newCellVal , I want to replace this old column value with sum.
The serious will be repeating till user press save button.
Thanks
Hi dev_pepper,
The posted information is not sufficient for testing your scenario. Please, post a sample which we would be able to test. In addition, to learn how to use “setcellvalue”, please look at the Grid’s API. The function accepts 3 arguments and they are required.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Ok here is my example.I need to set edited cell with a different value.
$(“#itemIssueDetailsGrid”).jqxGrid({
width: 300,
height:369,
source: dataAdapter,
theme: theme,
editable: true,
selectionmode: ‘singlecell’,
columns: [
{ text: ‘Item Name’, dataField: ‘itemName’,minwidth: 185, width: 185, editable: false},{ text: ‘Current Issue’, datafield: ‘currentIssue’, width: 130 ,editable:true, cellsformat:”d”}
]});
$(“#itemIssueDetailsGrid”).on(‘cellendedit’, function (event) {
var column = args.datafield;
var row = args.rowindex;
var newvalue = args.value;
var oldvalue = args.oldvalue;if(column==”currentIssue”){
var sum=newvalue+oldvalue;
$(“#itemIssueDetailsGrid”).jqxGrid(‘setcellvalue’, row , “currentIssue”, sum);//set edited cell with a different value,but this is not working}
});Hi dev_pepper,
The problem here is that you try to update a cell’s value until you’re still in edit mode. You should consider a different approach for your scenario, like using the “geteditorvalue” callback – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellcustomediting.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/can you please tell me ,How can i set editor value after cell edit?
Thanks
Ok Thank you Peter Stoev..I have fixed it..you people have done really great..
-
AuthorPosts
You must be logged in to reply to this topic.