【发布时间】:2017-06-18 11:34:24
【问题描述】:
我需要从剑道网格的一列中获取所有数据,我已经搜索了很多但没有找到有用的东西。我基于来自 API API/LogService/ReadAllLog 的 JSON 创建了一个剑道网格。无论如何我都在使用 AngularJS。
我的代码:
$scope.gridColumns = [{
field: "SystemName",
editable: false,
title: _t("Title.SystemName"),
allownull: false,
width: 100
}, {
field: "FormName",
editable: false,
title: _t("CommonTitle.SystemFeatureForm"),
allownull: false,
width: 100
}]
然后我这样填写:
$scope.gridConfig = {
autoBind: true,
inlineOperationalUrl: {
read: {
url: webAccess + "api/LogService/ReadAllLog",
}
}
};
这是我视图中的网格(注意:pn-gridview 是从角度网格视图创建的自定义指令,并进行了一些更改):
<pn-gridview id="SystemsGrid"
config="gridConfig"
columns="gridColumns"
</pn-gridview>
【问题讨论】:
-
如何创建网格(数据源)?请添加一些代码和你得到的最小示例。
-
api/LogService/ReadAllLog是什么类型的数据? -
它来自 MongoDB 数据库。
-
是的,但它是什么类型的数据? JSON、XML、.. ?
-
这是一个 .net 类的列表
标签: javascript html angularjs json kendo-grid