Hi,
I made custom widget which inherits from ListGrid. In Class.addProperties() for the CustomListGrid class fields are defined and canExpandRecords is set to true.
Now when more then one instance of custom grid is created column which holds expand buttons will multiply.
Multiplication occurs in way: one additional column per instance.
It means when two instances are created, the second has two expand columns. If three are created, the second will have two such columns and the 3rd instance will have three, and so on.
Code sample:
Country data was taken from SmartClient example but I've attached it to this post too with screen shot of the problem.
Is this a bug or API misuse?
---
SmartClient 8.0
FireFox 3.6.17
I made custom widget which inherits from ListGrid. In Class.addProperties() for the CustomListGrid class fields are defined and canExpandRecords is set to true.
Now when more then one instance of custom grid is created column which holds expand buttons will multiply.
Multiplication occurs in way: one additional column per instance.
It means when two instances are created, the second has two expand columns. If three are created, the second will have two such columns and the 3rd instance will have three, and so on.
Code sample:
Code:
ClassFactory.defineClass("CustomListGrid", ListGrid); CustomListGrid.addProperties({ width:500, height:300, alternateRecordStyles:true, data: countryData, fields: [ {name: "countryName", title: "Country"}, {name: "capital", title: "Capital"}, {name: "continent", title: "Continent"} ], canExpandRecords: true, expansionMode: "detailField", detailField: "background" }); VLayout.create({ ID: "multipleExpandColumnsBug", members: [ CustomListGrid.create({ ID: "countryList1" }), CustomListGrid.create({ ID: "countryList2" }) ] }); isc.Page.setEvent("load", "multipleExpandColumnsBug.draw()");
Is this a bug or API misuse?
---
SmartClient 8.0
FireFox 3.6.17
Comment