Ag-Grid将自定义列添加到agColumnsToolPanel。

huangapple go评论101阅读模式
英文:

Ag-Grid Add custom column to agColumnsToolPanel

问题

我有一个需求,需要在Ag Grid的列侧边菜单中添加额外的列,Ag-Grid是否支持这个功能?

更新我的问题:

我已经找到了解决方案的一半,即创建一个自定义工具面板并开始绘制列,但我遇到了三个问题:

1- 滚动不起作用
2- 列面板与状态栏重叠
3- 拖放不起作用

当前的解决方案结果如下:

Ag-Grid将自定义列添加到agColumnsToolPanel。

英文:

I have a requirement to add an extra column to column side menu in Ag grid
is that possible in Ag-Grid

Ag-Grid将自定义列添加到agColumnsToolPanel。

UPDATE my question

I figure half of the solution to create a custom tool panel and start drawing the columns but I face three issues with that

1- scroll not working
2- columns panel overlap with status bar
3- drag and drop not working

https://stackblitz.com/edit/react-ts-yjpquk?file=App.tsx,customStatsToolPanel2.tsx

current solution result
Ag-Grid将自定义列添加到agColumnsToolPanel。

答案1

得分: 1

我检查了你提供的链接,成功解决了重叠和滚动问题。

const divStyle = {
  overflowY: 'scroll',
  border: '1px solid red',
  width: '500px',
  float: 'left',
  height: '500px',
  position: 'relative'
};

这个样式可以用在一个容器 div 中,它会正常工作。

英文:

I checked the link you provided and was able to resolve the overlap and scrolling issues.

const divStyle={
overflowY: 'scroll',
border:'1px solid red',
width:'500px',
float: 'left',
height:'500px',
position:'relative'
};

This style can be used in a container div, and it will function properly.

huangapple
  • 本文由 发表于 2023年2月24日 00:34:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/75547703.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定