dgrid 将前几列设置为固定并使其他列可水平滚动

dgrid set first few columns to be fixed and make others scrollable horizontally

我有一个dgrid table,它很长,而且有水平滚动条,我想知道是否有办法固定前2或3列(始终显示)并应用水平滚动条到其余部分?

是的,dgrid 通过 ColumnSet 支持这一点。来自 documentation:

The ColumnSet module provides functionality which divides a grid's columns into multiple distinct sets, each of which manage their columns' horizontal scrolling independently. This makes it possible to keep certain columns in view even while others are scrolled out of viewing range.

您可以在 dgrid 站点中找到演示和示例。