I can't get dw.Object.column.Width.Autosize to work in grid DWs in PB 12.5 Classic. I'm setting it on all columns with code like:
if dw_report.Object.Datawindow.Processing = "1" then
li_columns = Integer(dw_report.Object.Datawindow.Column.Count)
for i = 1 to li_columns
ls_err = dw_report.Modify("#" + String(i) + ".Width.Autosize='3'")
if ls_err > "" then
MessageBox("When setting Width.Autosize on column " + String(i) + " error: " + ls_err)
end if
next
end if
But it's not doing anything - the columns are still the same widths (e.g. wider than the data in most cases, narrower in some cases) than without that code. And the Modify() call is not returning errors. I've tried other values for the Width.Autosize too - none of them seem to do anything.
Any bright ideas about what's wrong? Thanks.