Am I doing something wrong here? When it loads for the first time, the columns set their own widths. When I reload the data and re-run the function, the widths get set correctly. Function code below:
myDataGrid.resizableColumns = false;
myDataGrid.dataProvider = RecordSet(re.result);
myDataGrid.removeAllColumns();
myDataGrid.editable = true;
myDataGrid.headerHeight = 18;
myDataGrid.hScrollPolicy = "no";
myDataGrid.rowHeight = 18;
var col0 = new DataGridColumn("time");
col0.headerText = "Time";
col0.width = 50;
myDataGrid.addColumnAt(0, col0);
var col1 = new DataGridColumn("duration");
col1.headerText = "Duration";
col1.width = 50;
myDataGrid.addColumnAt(1, col1);
var col2 = new DataGridColumn("text");
col2.headerText = "Subtitle Text";
col2.width = 400;
myDataGrid.addColumnAt(2, col2);
var col3 = new DataGridColumn("delete");
col3.headerText = "Delete";
col3.width = 30;
col3.editable = false;
col3.cellRenderer = "IconCellRenderer";
myDataGrid.addColumnAt(3, col3);