Hi,
I want to move just data when I move the whole column; the header label should remain same at their place. How can I do this ???
You can use onBeforeCMove event, which occurs when column moved to new position
mygrid.attachEvent(“onBeforeCMove”,function(oldInd,newInd){
// any custom code to move data here
return false;
});
Hi,
I used following for changing the header name after moving the column.
libTableGrid.attachEvent(“onAfterCMove”,function(oldInd,newInd){
for (var i=1; i<=libTableGrid.getColumnsNum(); i++)
{
libTableGrid.setColumnLabel(i, String.fromCharCode(asciiCode));
asciiCode++;
}
return false;
});
But After moving column for the first time, it stops moving of the column.
How ?? Please Help.
Thanks in advance.
The same code works as expected in case of local samples
The snippet which you are using has two possible problems
>> for (var i=1; i<=libTableGrid.get
The column indexes started from 0, so first column will not be affected
>> asciiCode++;
You never reset this var to initial value, so labels will be different each time.
If necessary I can send working sample with the same code.
Hi,
Yeah please send the sample file with the same code.
Sample sent by email.