jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • vincentvega
    Member

    I had a typo In the jQuery grid css reference ….should have been “#jqxgrid” instead of “#jqxGrid”.


    vincentvega
    Member

    The cellvaluechanged event did not work for me. Tried with both ‘multiplecells’ and ‘singlecell’ selectionmode :

    			$("#jqxGrid").on('cellvaluechanged', function (event) 
    {
    var column = args.datafield;
    var row = args.rowindex;
    var value = args.newvalue;
    var oldvalue = args.oldvalue;
    alert("column: "+column+"\nrow: "+row+"\nnew value: "+value+"\nold value: "+oldvalue);
    });

    However, the ‘cellendedit’ did work for me as long as I select 1 cell.

    		 // event handling
    $("#jqxgrid").on('cellbeginedit', function (event) {
    var args = event.args;
    $("#cellbegineditevent").text("Event Type: cellbeginedit, Column: " + args.datafield + ", Row: " + (1 + args.rowindex) + ", Value: " + args.value);
    });
    $("#jqxgrid").on('cellendedit', function (event) {
    var args = event.args;
    var row = 1 + args.rowindex;
    var newValue = args.value;
    $("#cellendeditevent").text("Event Type: cellendedit, Column: " + args.datafield + ", Row: " + (1 + args.rowindex) + ", Value: " + args.value);
    //set new value
    myData[row-1].isSelected = newValue;
    });

    Do the type and # of grid events depend upon the grid selectionmode? If so, is there any documentation that specifies such a releationship? I looked for this in the API documentation and came up empty handed. Thanks.


    vincentvega
    Member

    I was able to figure this out…should have been referencing the array element in the basic jQuery calls like so….

    $('#headerText1').text(data.locationData[0].key1);
    $('#headerText2').text(data.locationData[0].key2);
Viewing 3 posts - 1 through 3 (of 3 total)