我想从我的骨干收集设置fuelux数据网格源。示例源代码位于https://github.com/ExactTarget/fuelux/tree/master/sample。设置沃尔沃数据网格骨干收集来源
我累得像
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else {
root.sampleData = factory();
}
}(this, function() {
return {
"geonames": new mycollection ///this will retrurn new collection array as in example
};
}));
我的骨干呈现由下面的代码instatate数据源
var dataSource = new StaticDataSource({
columns: [
{
property: 'username',
label: 'Name',
sortable: true
},
{
property: 'username',
label: 'Country',
sortable: true
},
data: this.collection,
delay: 250
});
$('#MyGrid').datagrid({
dataSource: dataSource,
stretchHeight: true
});
我得到的错误是没有定义StaticDataSource中。
任何人都可以解释我吗?或者如果你能帮助我解释如何设置来自主干收集的datssource数据的tutorail,我会非常感激。在我看来,加油剂剂量有很好的文档。
它已经解决了http://stackoverflow.com/questions/15764474/constructing-fuelux-datagrid-datasource-with-custom-backbone-collection?noredirect=1#comment22409076_15764474 – Lasang