Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 16 13:19
    kanyalka commented #7082
  • Jun 16 13:19
    kanyalka commented #7082
  • Jun 14 21:52
    Coveralls angular-ui/ui-grid (master) 0%
  • Jun 14 21:49
    Travis angular-ui/ui-grid (master) passed (4860)
  • Jun 14 21:42

    mportuga on v4.10.2

    (compare)

  • Jun 14 21:42

    mportuga on master

    chore: Release v4.10.2 (compare)

  • Jun 12 11:03
    Coveralls angular-ui/ui-grid (master) 0.07%
  • Jun 12 11:03
    Travis angular-ui/ui-grid (master) passed (4859)
  • Jun 12 10:57

    mportuga on a11y

    (compare)

  • Jun 12 10:57

    mportuga on master

    fix: 🐛 improve accessibility i… fix: 🐛 add missing translation… (compare)

  • Jun 12 10:57
    mportuga closed #7150
  • Jun 11 20:42
  • Jun 11 20:40
    commit-lint[bot] commented #7150
  • Jun 11 20:40
    mportuga synchronize #7150
  • Jun 11 20:40

    mportuga on a11y

    fix: 🐛 add missing translation… (compare)

  • Jun 11 20:27
  • Jun 11 20:25
    commit-lint[bot] commented #7150
  • Jun 11 20:25
    mportuga opened #7150
  • Jun 11 20:23

    mportuga on a11y

    fix: 🐛 add missing translation… (compare)

  • Jun 11 20:05

    mportuga on a11y

    fix: 🐛 improve accessibility i… (compare)

Yyan WU
@WuYouyan
no it's not used, i will suppress unused codes @yosiasz
Yosi
@yosiasz
@WuYouyan how about this?
      gridApi.selection.on.rowSelectionChanged($scope, function (row) {
        $scope.debounceUpdateGrid();
      });
      gridApi.selection.on.rowSelectionChangedBatch($scope, function (row) {
        updateGrid('column'); 
      });
Yyan WU
@WuYouyan
rowSelectionChanged, I used this for upgrade my custom aggregation result when I check on uncheck a row
Yosi
@yosiasz
but check uncheck does not seem to be working
Yyan WU
@WuYouyan
yes
It works
when you click on column 'age' option 'selected Sum'
and then check a row
it works
Yyan WU
@WuYouyan
I wanna know if there is an efficient way to notify grid to update custom aggregation result when check a group with many chidren rows ? XD @yosiasz
Yosi
@yosiasz
yeah, you already stated that :)
Thomas Travis
@tppt
Hi all, hoping someone can help me. I'm running into an issue where i have a parent directive wrapping a child directive, and the child directive implements a uiGrid.
However, when I directly $compile the parent directive, the uiGrid fails with $scope.uiGrid set to undefined in ui-grid.js
ui-grid.js actually runs twice. The first time everything is correct, but on the second run, $scope.uiGrid is undefined
Yosi
@yosiasz
can you post a sample out in stackblitz or something?
Yosi
@yosiasz
@tppt something like this. help us help you
https://plnkr.co/edit/VO6F3vlOOwaudfi3RSVA?preview
Thomas Travis
@tppt
It's alright, I figured it out finally (hopefully). I was defining gridOptions in the link function rather than in a controller attached to the directive. Which worked the first time it rendered but as soon as it needed to be re-rendered for whatever reason it would crash uigrid.
Yosi
@yosiasz
:thumbsup:
probably did not render the 1st with a gridoptions which made it look like it worked but then when really rendering it , it throws chunks
?
Thomas Travis
@tppt
Well, it would render the first time; it would populate with data and I can play around with data. It was only when trying to rerender the directive that ui-grid.js would run twice, and the second run would win, setting $scope.uiGrid to undefined
Gaurav Mallick
@gmallick_gitlab
Hi I have used ui-grid-cellNav directive in grid html and after that I am not able to select cell data content of ui grid any option is there?
2 replies
Yosi
@yosiasz
Greetings, within the ui-grid, is it possible to move items to different rows?
we need to implement this to allow changing ranking of items
Jeff Grossman
@jeffgrossman3000
You might need to say more about your use case. In my program, I assign a sort to the field and use notify to make it rejigger the rows. If I wanted to move values around I would do so in the data itself (so, in js/ts/whatever) rather than make a ui-grid API call.
Yosi
@yosiasz
use case: cyber security related recommendations have action items. action items have Rank. But things change so rank needs to change. maybe I could implement an arrow up/arrow down buttons that do the rank change by updating the data.
@jeffgrossman3000 thanks !
Yosi
@yosiasz
@jeffgrossman3000 use notify? uigrid haa notify?
Jeff Grossman
@jeffgrossman3000
See http://ui-grid.info/docs/#!/!/api/ui.grid.api:PublicApi about a third of the way down the page, "notifyDataChange(type)"
After all computations are finished, I call: $scope.gridMonApi.core.notifyDataChange( uiGridConstants.dataChange.EDIT );
Yosi
@yosiasz
👀👏👏👏
But do you commit the change to storage or just UI change? Fascinating
Yosi
@yosiasz
Ah maybe I can do a commit but no need to refecth to refresh the grid as it already has modified underlying data
Jeff Grossman
@jeffgrossman3000
The point of the notify is to tell the grid to re-draw itself anew.
    var nrows = $scope.gridOptionsMon.data.length;
    for (i = 0; i < nrows; i++) {
        $scope.get1Rand(20);
        $scope.gridOptionsMon.data[i].stroll = $scope.randOne;
    };
    $scope.gridMonApi.core.notifyDataChange( uiGridConstants.dataChange.EDIT );
This code walks the "Mon" grid, assigns a number to the "stroll" field, and after the walk is over I make sure the user sees what happened.
Yosi
@yosiasz
Yosi @yosiasz May 07 23:50
Very nice so no need to reload the whole grid by recreating it
GOPAL KUMAR
@Ginferyx
How to export ui-grid data as a image.
Jeff Grossman
@jeffgrossman3000
@Ginferyx I would say that is not a grid concern. You want a snapshot of the browser or the app window. Either you use a regular snipping tool and ask the user to choose the region, or you call any of various 'screen capture' APIs. Every browser is different so you'll have to do some digging.
ME2
@heyme2gm

@jeffgrossman3000 yes i have use third party api html2canvas.
but all data in ui-grid does not covert as an image.

<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.8.0/angular.js"></script>
<script src="http://ui-grid.info/release/ui-grid.js"></script>
<link rel="stylesheet" href="http://ui-grid.info/release/ui-grid.css" type="text/css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="script.js" ></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js'></script>
<script src='https://superal.github.io/canvas2image/c .js'></script><script src="./script.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Document</title>
<script>
angular.module('app', ['ui.grid']).controller('mycontroller', ['$scope', '$http', function ($scope, $http) {
$scope.gridOptions = {
enableGridMenu: true,
gridMenuCustomItems: [
{ icon: 'fa fa-picture-o',
title: 'Export Data as image',
action: function ()
{
html2canvas(document.querySelector('ui-grid-canvas'), {
onrendered: function(canvas) {
document.body.appendChild(canvas);
return Canvas2Image.saveAsPNG(canvas);
},
});
}, order: 100 } ],
};
$scope.gridOptions.columnDefs = [
{ field:'id',},
{ field:'name',},
{ field:'address', },
{ field:'age',},
{field: 'company',},
{field:'email',},
{field:'gender',},
{field:'balance',},
];
$scope.title ="Export as Image";
$http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500_complex.json')
.then(function(response) {
$scope.gridOptions.data = response.data;
$scope.mydata = response.data;
console.log($scope.gridOptions);
});
}]);
</script>
</head>
<body ng-controller="mycontroller">
<div ui-grid="gridOptions" id="screen" ui-grid-exporter class="grid"></div>
</div>
</body>
</html>

Yosi
@yosiasz
@heyme2gm it's not an issue with ui-grid
you are trying to do something outside of the functionality of ui-grid
you might want to look into the export feature of ui-grid
image.png
Chiva Song
@chiva.song1013_gitlab
hi
testing
Yosi
@yosiasz
Greetings, I can seem to be able to get selected rows in a ui-grid. I have tried all kinds of stuff but I am about to settle managing the selected state with my own array that I pull data in and out.
Jeff Grossman
@jeffgrossman3000
What happens instead?