jQWidgets Forums

Forum Replies Created

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

  • sarah.tx
    Member

    Hi Peter,

    Do you have any updates on this? Were you able to reproduce it?

    Thanks,
    Sarah


    sarah.tx
    Member

    Got it. Thanks for the info!

    in reply to: Validation message pop-up Validation message pop-up #13876

    sarah.tx
    Member

    Hi Peter,

    I’m running into the same problem. I tested mrkozanoglu’s sample code with the latest version of jqWidgets, but the problem is still there. The validation popup doesn’t show after the data source is refreshed. I know the release notes said it’s fixed in 2.5. Is there a different way to update the data source so that this problem can be avoided? Any ideas?

    Thanks for your help!


    sarah.tx
    Member

    Hi Peter,

    Thank you for the quick response. All I need is to be able to change the color of several particular columns, statically. Not when they are selected or hovered. The purpose is to highlight the columns that are editable. Do you have any sample code that would achieve this using the renderer callback function you mentioned?

    Thanks!


    sarah.tx
    Member

    Here is the modified demo code with minimal change. I added sortable property to the grid, and after sorting on the first name, then selecting a random row and clicking delete, the wrong row is deleted.

    This example demostrates how we can manipulate data at client side. The Grid plugin provides you callback functions when you add, remove or update a row.

    $(document).ready(function () {

    // prepare the data
    var data = {};
    var firstNames =
    [
    “Andrew”, “Nancy”, “Shelley”, “Regina”, “Yoshi”, “Antoni”, “Mayumi”, “Ian”, “Peter”, “Lars”, “Petra”, “Martin”, “Sven”, “Elio”, “Beate”, “Cheryl”, “Michael”, “Guylene”
    ];
    var lastNames =
    [
    “Fuller”, “Davolio”, “Burke”, “Murphy”, “Nagase”, “Saavedra”, “Ohno”, “Devling”, “Wilson”, “Peterson”, “Winkler”, “Bein”, “Petersen”, “Rossi”, “Vileid”, “Saylor”, “Bjorn”, “Nodier”
    ];
    var productNames =
    [
    “Black Tea”, “Green Tea”, “Caffe Espresso”, “Doubleshot Espresso”, “Caffe Latte”, “White Chocolate Mocha”, “Cramel Latte”, “Caffe Americano”, “Cappuccino”, “Espresso Truffle”, “Espresso con Panna”, “Peppermint Mocha Twist”
    ];
    var priceValues =
    [
    “2.25”, “1.5”, “3.0”, “3.3”, “4.5”, “3.6”, “3.8”, “2.5”, “5.0”, “1.75”, “3.25”, “4.0”
    ];
    var generaterow = function (i) {
    var row = {};
    var productindex = Math.floor(Math.random() * productNames.length);
    var price = parseFloat(priceValues[productindex]);
    var quantity = 1 + Math.round(Math.random() * 10);
    row[“firstname”] = firstNames[Math.floor(Math.random() * firstNames.length)];
    row[“lastname”] = lastNames[Math.floor(Math.random() * lastNames.length)];
    row[“productname”] = productNames[productindex];
    row[“price”] = price;
    row[“quantity”] = quantity;
    row[“total”] = price * quantity;
    return row;
    }
    for (var i = 0; i = 0 && selectedrowindex < rowscount) {
    var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
    var commit = $("#jqxgrid").jqxGrid('updaterow', id, datarow);
    $("#jqxgrid").jqxGrid('ensurerowvisible', selectedrowindex);
    }
    });
    // create new row.
    $("#addrowbutton").bind('click', function () {
    var datarow = generaterow();
    var commit = $("#jqxgrid").jqxGrid('addrow', null, datarow);
    });
    // create new rows.
    $("#addmultiplerowsbutton").bind('click', function () {
    $("#jqxgrid").jqxGrid('beginupdate');
    for (var i = 0; i = 0 && selectedrowindex < rowscount) {
    var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
    var commit = $("#jqxgrid").jqxGrid('deleterow', id);
    }
    });
    });

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