For now I am skipping trying to get the column widths from the zen page property, columnWidths. I am hard coding the values in the dgRender method. I am using the below to change the column widths but the alerts are showing me that the first 3 columns are set but then dgRender (which is the target of the onrender property of the dynaGrid) is being called again. Not sure why this is happening.
ClientMethod dgRender(pGrid) [ Language = javascript ]
{
var colWidths = [300,110,110,200,160,60,300,100,50,60];
var dataSet = pGrid.getDataSet();
var maxrows = dataSet.getDimSize(1);
var maxcols = dataSet.getDimSize(2);
alert('dgRender:\n\n colWidths = ',colWidths);
for (var col=0; col<maxcols; col++) {
alert('dgRender:\n\n col = '+col+'\n colWidth = '+colWidths[col]);
pGrid.setColumnProperty(col, "columnWidth", colWidths[col]);
}
}
Thank you for your time.
- Log in to post comments