:: Forum >>
How to set a column minium width
I'm trying to set a minium width for columns in code. I've tried the following:
obj.onColumnWidthChanged = function(value, index){
if(value<60){
obj.setColumnWidth(60, index);
}
};
but with no sucess.
Mike B
Tuesday, June 13, 2006
You should use onColumnWidthChanging event which fires before the change and cancel it if the value is too small (returning non-zero error code or message).
var obj = new AW.UI.Grid;
obj.setCellData("cell");
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(10);
document.write(obj);
obj.onColumnWidthChanging = function(width, column){
if (width < 50) {
this.setColumnWidth(50, column);
return "too small!";
}
}
Alex (ActiveWidgets)
Tuesday, June 13, 2006
Hi Alex
How can we set the width of column as maximum length data of all cells in that particular column ?
For exmaple if a grid has 2 columns and columnA has some data that has length say 12 characters.Now we want that this column should be able to show 12 characters without any wrapping.
Thanks
Vikramaditya garg
Fidelity Investments.
Vikramaditya Garg
Wednesday, June 28, 2006
Was there ever an resolution to the last question?
"How can we set the width of column as maximum length data of all cells in that particular column ?"
I could use this.
Colin P.
Wednesday, October 18, 2006
This topic is archived.
Back to support forum
Forum search