dojodgrid

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


I have a dgrid table which is very long one, and there is horizontal scroll bar, I want to know if there is a way to make first 2 or 3 columns fixed (always displayed) and apply horizontal scrollbar to the rest ?


Solution

  • Yes, dgrid supports this with ColumnSet. From the 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.

    You can find demos and example in the dgrid site.