【问题标题】:How to set dynamic column width to AG-Grid?如何将动态列宽设置为 AG-Grid?
【发布时间】:2020-10-22 14:58:21
【问题描述】:

我想动态设置列宽。这意味着这里附加了 stackblitz 示例。根据那个例子,当我改变屏幕大小时,只改变表格边框。没有改变列宽!|

我想改变列宽也随着表格改变!

https://stackblitz.com/edit/ag-grid-angular-hello-world-kinvv8?file=src%2Fapp%2Fapp.component.ts

【问题讨论】:

    标签: javascript html css angular


    【解决方案1】:

    试试这个....

        remove position form app.component.html relative;left: 25% 
        and rpelace style="width: 100%; height: 220px

    【讨论】:

    • 感谢您的尝试!但这是行不通的。右侧宽度适合屏幕,但内容不变!
    • 我有另一个解决方案给你。你使用java script re size函数
    • with if else method like this $(document).ready(function(){})
    • var width = $("table").width();转到 console.log(width) 然后使用 if else 调用 resize 函数,例如 if (width
    • if(width
    猜你喜欢
    • 2016-06-23
    • 2019-02-24
    • 2018-01-05
    • 2019-11-18
    • 2020-02-20
    • 2020-06-03
    • 2018-05-25
    • 1970-01-01
    • 2017-08-06
    相关资源
    最近更新 更多