Hi,
I need to set a style of the cells for a specific column. How do I do that? I see how to set style for a row and how to set style for a specific cell, but not how to set it for a column. Is this possible or do I have to loop through each row setting the style on the cell?
Thanks,
Richard Butler
my addr is:
first initial + last name [a t] ajc [d o t] bz
There is no way to attach the same style to all the cells in column
If you need to set column color|align it can be done through grid.setColumnColor grid.setColAlign
For any other styles the only possible solution - looping through all rows after data loading.
grid.load(url,function(){
grid.forEachRow(function(id){
grid.cells(id,INDEX).cell.style.color=“red”;
})
});
Thanks for the reply! Would I also be able to set a className property instead of setting a property on the style object? So:
grid.load(url,function(){
grid.forEachRow(function(id){
grid.cells(id,INDEX).cell.className=“FancyFrooFrooStyle”;
})
});
Yes, it will be correct code as well.
The grid.cells(i,j).cell is HTML element of cell, so any HTML related operation can be executed against it.
Hi i need help plz,
How can we set color background for columns grid in json?
thanks
With json, this worked for me:
myGrid.load(url,function(){
gameTextGrid.forEachRow(function(id){
gameTextGrid.cells(id,1).cell.style.color="red";
})
},"json");