Comments (9)
Without seeing the entire code, it's hard to help you but there might be a few things you can check. First of all, Angular-Slickgrid uses internally the gridId
to create the SlickGrid grid, you passed a gridId
, so you're ok on that side. Some notes, when you use (onAngularGridCreated)
, there is no reason to use (onDataviewCreated)
and (onGridCreated)
, the last 2 were created long time ago and the only reason I don't remove them is to not break anyone's code, so keep only (onAngularGridCreated)
.
Other things to look into, do you have multiple grids? Are you creating the columnDefinitions
and they gridOptions
after the cycle ngOnInit
or afterViewInit
? Remember that it won't work in the constructor
(too early in the cycle) which, now that I think of it, might be your problem.
from angular-slickgrid.
Hi,
Thanks for the answer.
I removed (onDataviewCreated) and (onGridCreated) methods, also my columnDefinitions and gridOptions are in ngOnInit method.
still getting the same error:
ERROR Error: SlickGrid requires a valid container, #contactsGrid3 does not exist in the DOM.
My grid should be placed on Angular Material tab component (mat-tab). If I move the grid out of the mat-tab and removing id from root div - everything is working.
Looks like problem to create grid wrapper inside mat-tab component.
from angular-slickgrid.
I never used Material, I prefer Bootstrap and made the lib around it, but it should work with Material (it will still need to Bootstrap). It's also useful to know that SlickGrid (the core lib, not my lib) has some problem when the grid is hidden, which might be your problem with your tabs. What you can try to do is to add an *ngIf
on <angular-slickgrid>
(or on a <div>
that wraps Angular-Slickgrid) to only create it when the Tab is shown, I remember having to do that in some cases
from angular-slickgrid.
Hi,
It is working with *ngIf and need to be seted containerId in autoresize property.
Thanks
from angular-slickgrid.
@audrys so I assume that we can close the issue then?
from angular-slickgrid.
Closing as I think this is now resolved. I can reopen if need be.
Again up vote ⭐️ if you like the lib, thanks :)
from angular-slickgrid.
Could you please attach a sample code of how to solve this? I tried it with the above steps and could not figure it out.
from angular-slickgrid.
What you can try to do is to add an
*ngIf
on<angular-slickgrid>
(or on a<div>
that wraps Angular-Slickgrid) to only create it when the Tab is shown
isn't it clear enough?
<angular-slickgrid *ngIf="tabReady">
If you can't understand, then please ask your question on Stack Overflow
from angular-slickgrid.
what refers tabReady ?
from angular-slickgrid.
Related Issues (20)
- Frozen columns do not fit in viewport HOT 3
- The Multi-column tri-state sorting option doesn't work HOT 2
- Boolean column with filter collection and render html not working, displays true/false HOT 7
- Update Step By Step Install Wiki page HOT 10
- Example 22 keeps formatter components alive outside of grid HOT 20
- Example 22 shows temp ng-template being rendered for a short period
- cell highlighted stays on the same position even when filtered HOT 1
- Attach Angular Component in AsyncPostRender and keep it running HOT 2
- I have issues with Editor text box. HOT 6
- I am getting error when I use multipleSelect . "Cannot find type definition file for 'trusted-types'. " HOT 9
- Shared module gridOptions seetings not preserve in page module HOT 15
- All items in grid appear highlighted after adding an item to the grid HOT 9
- Incorrect dataContext is passed in `onSave` callback using composite editor HOT 6
- Polyfills ERROR TypeError: Function.prototype.toString requires that 'this' be a Function at Boolean.toString (<anonymous>) HOT 25
- Custom header and footer templates, like for Aurelia
- No data warning stays if data lazy loaded and gridOptions changed HOT 12
- Angular slickgrid upgrade does not working HOT 3
- between Operator HOT 1
- Angular esbuild error on DomPurify with rowDetailView and no pre/post template HOT 5
- CSP compliance HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-slickgrid.