[eluser]paulopmx[/eluser]
[quote author="Xiomay" date="1208458167"][quote author="Xiomay" date="1208441282"]thanks for the quick reply but it unfortunately doesnt work.
what kind of parameters i should so set within this brackets?
Code:
var flex = $('#table-1').flexigrid({set parameters here});
shall put these codes in the flexigrid.js? or in my own js-script file?
is to swap the columns table, am i right?[/quote]
Now i did it .. but i can only mov the <tbody>, the <thead> still remains at the same position
its like this:
Code:
function swapCol(id){
var flex = $('#'+id).flexigrid({});
flex.moveColumn(1,9);
}
$.fn.moveColumn = function(c1,c2) { // function to test
return this.each( function() {
if (this.grid) this.grid.switchCol(c1,c2);
});
}; //end test
[/quote]
Great Effort Xiomay! Try adding this:
Code:
$.fn.moveColumn = function(c1,c2) { // function to test
return this.each( function() {
if (c1>c2)
$('th:eq('+c2+')',this.grid.hDiv).before($('th:eq('+c1+')',this.grid.hDiv));
else
$('th:eq('+c2+')',this.grid.hDiv).after($('th:eq('+c1+')',this.grid.hDiv));