jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • dlinstedt
    Participant

    Never mind, i found the problem. Here’s the code that works…

    The problem was 1) I used ID of “jqxGrid” when my object id actually is: “jqxgrid” lower case.
    I kept getting an ID not found error – (my own fault).
    I also had to switch the code around:

     var row = { firstname: $("#firstName").val(), lastname: $("#lastName").val(), productname: $("#product").val(),
     quantity: parseInt($("#quantity").jqxNumberInput('decimal')), price: parseFloat($("#price").jqxNumberInput('decimal'))
     };
     $("#popupWindow").jqxWindow('hide');
     var b = $('#jqxgrid').jqxGrid('addrow', null, row);
     if (b) {
        var rows = $('#jqxgrid').jqxGrid('getrows');
        $("#jqxgrid").jqxGrid('selectrow',rows.length-1);
        $("#jqxgrid").jqxGrid('ensurerowvisible',rows.length-1);
     };

    I had to close the popup window so HTML could “focus” properly, and the grid could scroll properly.

Viewing 1 post (of 1 total)