jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Cell Editing

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  dev_pepper 11 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Grid Cell Editing #46101

    dev_pepper
    Participant

    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

    Grid Cell Editing #46109

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Grid Cell Editing #46140

    dev_pepper
    Participant

    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

    }
    });

    Grid Cell Editing #46148

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Grid Cell Editing #46151

    dev_pepper
    Participant

    can you please tell me ,How can i set editor value after cell edit?

    Thanks

    Grid Cell Editing #46153

    dev_pepper
    Participant

    Ok Thank you Peter Stoev..I have fixed it..you people have done really great..

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.