我正在使用AngularJS和Bootstrap 3创建一个App.我想显示一个包含数千行的表/网格.AngularJS和Bootstrap的最佳可用控件是什么,具有排序,搜索,分页等功能.
angularjs ng-grid twitter-bootstrap-3 angular-ui-grid smart-table
我正在使用:https://github.com/angular-ui/ui-grid.info/tree/gh-pages/release/3.0.0-RC.18
<div ui-grid="gridOptions" style="height:765px"></div>
Run Code Online (Sandbox Code Playgroud)
当我对值进行硬编码时,如上所示,网格展开,一切都按预期工作.
但是,如果我做以下事情......
$scope.gridStyle = 'height:'+numRows*rowHeight+'px' //(765px);
<div ui-grid="gridOptions" style="{{gridStyle}}"></div>
Run Code Online (Sandbox Code Playgroud)
高度打印在div和div加宽,但内容本身扩大到只有340px左右.剩下的空间是空白的,所以不是25行我只看到8.我必须向下滚动,而网格中有400px的空闲.ui-grid-viewport和ui-grid-canvas都没有使用这个空间......
为什么ui-grid-viewport不能使用那个空间?
如何$scope从ui-grid单元模板访问?这是我的控制器代码:
app.controller('MainCtrl', ['$scope', function ($scope) {
// i want to reference this from a cell template.
$scope.world = function() { return 'world'; };
$scope.gridOptions = {
data: [
{ id: "item1" },
{ id: "item2" }
],
columnDefs: [
{
field: 'id',
// world() is never called and is not displayed.
cellTemplate: '<div>{{ "hello " + world() }}</div>'
}]
};
}]);
Run Code Online (Sandbox Code Playgroud)
请在此处查看:http: //plnkr.co/edit/WYXeQShHWKDYDs4MIZnP?p = preview
我希望细胞内容显示"你好世界",但他们只是显示"你好".
测试Angular ui-grid(ng-grid v.3.0).不能为我的生活找到选定的行.我只是想在用户点击它时抓住行或行的行ID.在这里找到了最热门的评论,但我认为这已经过时了: 从ng-grid获取选择的行?
有谁知道gridOptions.selectedItems3.0中存储的位置?
我查看了angular-ui模块,因为我需要实现一个网格.
我看到有稳定的ng网格和不稳定版本的ui-grid.
我应该使用哪个版本?
它们是非常不同还是难以切换?
最近我们想改变我们当前的网格工具.目前我们正在使用kendo-ui进行网格和所有.搜索后我们得到了3个结果.但是,我们仍然不确定哪个更好,为什么在未来的运行.
使用剑道时,我们错过了对它的控制权.如果任何人能帮助我们选择带有角度的正确网格,那将是一件好事.
我正在尝试更新我的ui-grid的columDefs中的可见性选项.更新值后,我需要刷新我的ui-grid.从我的控制器刷新网格的方法是什么?
我创建了有三列的ui-grid,默认情况下,列标题有一个'v'形图标(在图像中用红色圆圈标记):
这里代码和plunker:
var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.expandable', 'ui.grid.selection', 'ui.grid.pinning']);
app.controller('ThirdCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) {
$scope.gridOptions = {
expandableRowTemplate: 'expandableRowTemplate.html',
expandableRowHeight: 150,
onRegisterApi: function (gridApi) {
gridApi.expandable.on.rowExpandedStateChanged($scope, function (row) {
if (row.isExpanded) {
row.entity.subGridOptions = {
columnDefs: [
{ name: 'name'},
{ name: 'gender'},
{ name: 'company'}
]};
$http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/100.json')
.success(function(data) {
row.entity.subGridOptions.data = data;
});
}
});
}
}
$scope.gridOptions.columnDefs = [
{ name: 'id', pinnedLeft:true },
{ name: 'name'},
{ name: 'age'},
{ name: …Run Code Online (Sandbox Code Playgroud)我正在使用ui grid 3.0.6.直到昨天它工作正常.但是现在Google Chrome存在问题.(版本56.0.2924.87)
当我滚动网格,或单击向下滚动箭头时,它开始滚动非常快.无法控制速度.它运行良好,只在Chrome中运行.
有人可以帮忙吗?
提前致谢.
angular-ui-grid ×10
angularjs ×8
javascript ×3
ng-grid ×2
ui-grid ×2
ag-grid ×1
angular-ui ×1
kendo-grid ×1
slickgrid ×1
smart-table ×1