Here's some sample code with a problem verified on the latest Smartclient. The DynamicForm component is wider than 250. The ListGrid's horizontal scrollbar seems to realize this, but if I try to scroll right it flickers back to the left immediately.
I could change DynamicForm.numCols or ListGridField.width to avoid the problem, but I'd prefer a way for me to let the width be fit dynamically.
I could change DynamicForm.numCols or ListGridField.width to avoid the problem, but I'd prefer a way for me to let the width be fit dynamically.
Code:
isc.ClassFactory.defineClass("MixedLabResultViewer", isc.ListGrid);
isc.MixedLabResultViewer.addProperties({
height: 100,
width:500,
autoFitWidth: false,
autoFitData: "vertical",
showRecordComponents: true,
showRecordComponentsByCell: true,
virtualScrolling: false,
fields:[
{name:"measurementType", title: "Test"},
{name:"values", title: "Result"}
]
});
isc.MixedLabResultViewer.addMethods({
createRecordComponent : function (record, colNum) {
var fieldName = this.getFieldName(colNum);
if(fieldName == "values"){
var df = isc.DynamicForm.create({
width:"*",
numCols:6,
wrapItemTitles: false,
fields: [
{name:"field1", title: "Field 1 Title",
defaultValue: "Field 1 Value"},
{name:"field2", title: "Field 2 Title",
defaultValue: "Field 2 Value"},
{name:"field3", title: "Field 3 Title",
defaultValue: "Field 3 Value"},
]
});
return df;
}
return null;
}
});
var lg = isc.MixedLabResultViewer.create({
});
lg.addData({});
lg.addData({});
Comment