or


'<li><label><input type="checkbox" data-#=ns#field="#=columns[col].field#" data-#=ns#index="#=columns[col].index#"/>#=columns[col].title#</label></li>'+'<li><input type="checkbox" data-#=ns#field="#=columns[col].field#" data-#=ns#index="#=columns[col].index#"/>#=columns[col].title#</li>'// First put the label BEFORE the input
var chkIdCounter = 1;
$("label > input[type='checkbox']").each(function () {
$(this).attr("id", "labeledCheckBox" + chkIdCounter);
$(this).parent().attr("for", "labeledCheckBox" + chkIdCounter++);
$(this).insertBefore($(this).parent().parent().find($(this).parent()));});/* then hide the input and display a sprite in place */
input[type="checkbox"]{ position: absolute; display: none;}input[type="checkbox"]:checked ~ label::before{ background-position: 0 -20px;}/* skin-specific sprite */input[type="checkbox"] ~ label::before{ background-image: url('itesoft/radios.png');} grid.destroy();
$("#grid").empty();
and then re-create the grid using the same code that I used to initialize the grid in the first place, however this appears to have the issue that when the data is reloading the reordable facility on the grid ceases to function.
Does anyone know of a way where I can re-load a grid with new data and a new set of columns without the re-odering isue?
Thanks
Craig
$("#chart").kendoChart({ title: { text: "Units sold" }, seriesDefaults: { width: 2, markers: { visible: false, }, overlay: { gradient: null } }, series: [{ type: "area", transitions: false, width: 2, data: [ 230, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 0, 10 ] }, { type: "line", transitions: false, width: 2, data: [ 250, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 250, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 250, null, 0 ], missingValues: "interpolate" }], valueAxis: { labels: { visible: true }, line: { visible: false } }, categoryAxis: { baseUnit: "hours", baseUnitStep: 1, majorGridLines: { visible: false }, labels: { visible: true, //format: "{0}", skip: 12, step: 24, rotation: 0, format: 'dd MM yyyy' }, categories: [new Date('06/20/2013 00:00'), new Date('06/20/2013 00:00'), new Date('06/20/2013 01:00'), new Date('06/20/2013 02:00'), new Date('06/20/2013 03:00'), new Date('06/20/2013 04:00'), new Date('06/20/2013 05:00'),new Date('06/20/2013 06:00'), new Date('06/20/2013 07:00'), new Date('06/20/2013 08:00'), new Date('06/20/2013 09:00'), new Date('06/20/2013 10:00'), new Date('06/20/2013 11:00'), new Date('06/20/2013 12:00'),new Date('06/20/2013 13:00'), new Date('06/20/2013 14:00'), new Date('06/20/2013 15:00'), new Date('06/20/2013 16:00'), new Date('06/20/2013 17:00'), new Date('06/20/2013 18:00'), new Date('06/20/2013 19:00'),new Date('06/20/2013 20:00'), new Date('06/20/2013 21:00'), new Date('06/20/2013 22:00'), new Date('06/20/2013 23:00'), new Date('06/21/2013 00:00'), new Date('06/21/2013 00:00'),new Date('06/21/2013 01:00'), new Date('06/21/2013 02:00'), new Date('06/21/2013 03:00'), new Date('06/21/2013 04:00'), new Date('06/21/2013 05:00'),new Date('06/21/2013 06:00'), new Date('06/21/2013 07:00'), new Date('06/21/2013 08:00'), new Date('06/21/2013 09:00'), new Date('06/21/2013 10:00'), new Date('06/21/2013 11:00'), new Date('06/21/2013 12:00'),new Date('06/21/2013 13:00'), new Date('06/21/2013 14:00'), new Date('06/21/2013 15:00'), new Date('06/21/2013 16:00'), new Date('06/21/2013 17:00'), new Date('06/21/2013 18:00'), new Date('06/21/2013 19:00'),new Date('06/21/2013 20:00'), new Date('06/21/2013 21:00'), new Date('06/21/2013 22:00'), new Date('06/21/2013 23:00'), new Date('06/22/2013 00:00'), new Date('06/22/2013 00:00'),new Date('06/22/2013 01:00'), ], majorTickType: "none" } });