Hi
I want a small clarification on one of the use case related to IgrDataGrid (https://es.infragistics.com/products/ignite-ui-react/react/components/grids/data-grid/overview).
I have used IgrDataGrid, in that I have multiple grids lets suppose Grid1 and Grid2 both the grids are on separate tab(Tab1 , Tab2) and Grid1 is my default grid which will be visible when I open the component.
So the issue is that when I open the component then I'm doing grid.loadLayout(gridLayout); here this loadLayout function is throwing an exception for Grid2 and I'm not able to load the layout for the same (Grid2).
So, for this I need to know how can I load the layout for multiple grids.
Hoping for a positive response.
Thanks!!!
Hello Shubham,
I would like to know if your grid1 and grid2 has the same schema ? If yes then only you can save one grid layout and load it into another grid.
Try to save grid1 layout ,make some changes into layout and then load the same layout into grid1 and test is it working ?
This should work and if you load the same layout into grid2 is not working that means grid2 layout/schema is different.
If you are still not sure then share your sample for me to have a look .
Hello Divya,
Thank you for your response.
Here I have attached the screenshot for the better understanding.
As we can see in SS, we have Two different tabs and each tab has separate grid on it. Also we have separate layouts/schema for both the grids.
So when we open the page we are loading the layouts(Separate layouts) for both the grids. then layout for 1st grid (which is on Tab1) is applying successfully and for 2nd grid (which is on Tab2) loadLayout is throwing an Exception.
TypeError: Cannot read properties of undefined (reading 'd')at SpatialEngine2.l (ColumnFilterCondition_combined.js:30853:28)at SpatialEngine2.k (ColumnFilterCondition_combined.js:30849:21)at Grid2.vu (ColumnFilterCondition_combined.js:12129:24)at Grid2.uv (ColumnFilterCondition_combined.js:11995:14)at Grid2.uu (ColumnFilterCondition_combined.js:14958:50)at IgrDataGrid2.loadLayout (igr-data-grid.js:4233:16)at onGridReference (InfragisticsReactGrid.tsx:260:14)at commitAttachRef (react-dom.development.js:23645:20)at commitLayoutEffectOnFiber (react-dom.development.js:23503:9)at commitLayoutMountEffects_complete (react-dom.development.js:24688:9)
We are using the ref callback to load the layout for both the grids. and when user in on Tab1 then getting an issue for loading layout for Tab2 and vice versa.
NOTE: Tab1 is our default tab so when the page is loaded Tab1 is visible to the user by default and user can switch between the tabs.
Thanks.