Hi, I have a scenario where I use an igGrid that is initialised along with the page and hidden with the ng-show directive, and as data comes in over a Solace connection, the data source is updated.
This should then show the grid correctly rendered with the information in the new rows.
I've tried several approaches, but there seems to be issues with each attempt.
I'm using version 15.2.20152.2081 and need to support IE11
Is there a reliable cross browser way to get this working?
<table id="igniteGrid" ng-show="rowCount > 0"></table>
I've added the relevant snippets of js code here
https://plnkr.co/edit/9kmBTiZHUtEm5k3EZMnY?p=catalogue
I've made some progress by explicitly styling the row height and some column widths, but there is something fundamental not working in IE.
In Chrome, the adding of the rows works ok.
I get rows appearing as they are published to the client.
In IE, I get a single row appear, with no data in it, then nothing else happens with subsequent messages.
EDIT: I've fixed this now. Turns out it was an issue with the DOMParser inspecting XML differently between browsers.
Another issue though, my users are very keen on the grouping and filtering on the Silverlight XamGrid, but the igGrid doesn't display the same behaviour.
If I group by a column header, and a new message comes in, it just adds the row to the bottom of the grid, and doesn't place it in the relevant grouping.
Is there a way to get this behaviour working without jumping through hoops?
EDIT: I've partially fixed this with a workaround posted elsewhere (saving layout, dataBind, load layout) but performance is very poor. Still open to suggestions on this one.
As an aside, the whole dataBinding thing and having to both update the model + the grid seems counter intuitive from a separation of concerns POV.
As a comparison, the Handsontable allows you to bind a JSON array, and any changes to the data model immediately reflect in the UI through two way binding. Is this a feature that is in development?
Thanks,
Matt.
Hello Matt,
From what I understand you are trying to alter the data of the igGrid by altering just the $scope.data from where the dataSource is taken.Based on the sample you provided and the way the dataSource is set is in the jQuery widget initialization, this way when the $scrope.data is changed it cannot detect the change and pass it to the dataSource option of the grid by itself. You could look at our sample in our github.io sample page:
http://igniteui.github.io/igniteui-angular/samples/igGrid-controller.html
In this sample we show how can be created a gridController for which we change the $scope.northwind which acts as our data so in your case would be $scope.data.
About the other question, regarding adding a row when you already grouped by a column, it indeed requires to call dataBind method after adding it since this scenario is not supported by default.
If you need more information let me know.
Regards,Svetoslav Krastev,Infragistics