JavaScript/jQuery TreeList - Column Fixing
In some cases, the UI component contains so many columns that they cause horizontal scrolling. If specific columns should be on screen constantly regardless of how far the UI component is scrolled, a user can fix them.
To allow this, set the columnFixing.enabled property to true. If a user should never fix (or unfix) a specific column, set its allowFixing property to false.
jQuery
$(function() { $("#treeListContainer").dxTreeList({ columnFixing: { enabled: true }, columns: [{ // ... allowFixing: false }] }); });
Angular
<dx-tree-list ... > <dxo-column-fixing [enabled]="true"></dxo-column-fixing> <dxi-column [allowFixing]="true" ... ></dxi-column> </dx-tree-list>
import { DxTreeListModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxTreeListModule ], // ... })
If a column should be fixed initially, assign true to its fixed property and specify its target position in the UI component using the fixedPosition property.
jQuery
$(function() { $("#treeListContainer").dxTreeList({ columns: [{ // ... fixed: true, fixedPosition: "left" }] }); });
Angular
<dx-tree-list ... > <dxi-column [fixed]="true" fixedPosition="left" ... ></dxi-column> </dx-tree-list>
import { DxTreeListModule } from "devextreme-angular"; // ... export class AppComponent { // ... } @NgModule({ imports: [ // ... DxTreeListModule ], // ... })
Since column fixing is effective only with horizontal scrolling, using it makes sense only if the columnAutoWidth property is false and when the total width of columns exceeds the container width. Otherwise, fixed columns behave just like regular ones.
See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.