jQWidgets Forums
Forum Replies Created
-
Author
-
January 26, 2013 at 7:05 pm in reply to: Problem with ID's after sorting column Problem with ID's after sorting column #14228
Hi Peter,
Do you have any updates on this? Were you able to reproduce it?
Thanks,
SarahJanuary 18, 2013 at 8:00 pm in reply to: cellvaluechanged and cellendedit not triggered cellvaluechanged and cellendedit not triggered #13877Got it. Thanks for the info!
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!
January 3, 2013 at 8:02 pm in reply to: Change color of column header for selected columns Change color of column header for selected columns #13090Hi 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!
December 17, 2012 at 6:49 pm in reply to: grid 'deleterow' deleted wrong row after sorting grid 'deleterow' deleted wrong row after sorting #12480Here 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);
}
});
}); -
AuthorPosts