How to display two grids side by side using Angular 6 -Ag grid

孤街醉人 提交于 2021-02-11 12:06:40

问题


I am trying to place two grids side by side ,but the second grid is automatically shifted to the next line.

I have reduced the width of the grids to 40% each ,and also tried to place the grids in <span> ,But still I am not able to display the grids beside each other.


回答1:


Using flexbox should solve your problem:

.row {
  display: flex;
}

.column {
  flex: 50%;
  padding: 10px;
  height: 500px;
}

<div class="row">
  <div class="column">
    <ag-grid-angular [gridOptions]="firstGrid" class="ag-theme-balham"></ag-grid-angular>
  </div>
  <div class="column">
    <ag-grid-angular [gridOptions]="secondGrid" class="ag-theme-balham"></ag-grid-angular>
  </div>
</div>


来源:https://stackoverflow.com/questions/55687114/how-to-display-two-grids-side-by-side-using-angular-6-ag-grid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!