TreeList.ColumnVisibilityChanged

Syntax

ColumnVisibilityChanged: function (sender, args);

Parameters

sender. Event source.

args. Event information. Available arguments: Column -  index of a column with modified visibility; Visibility - column visibility: true - column is showed, false - column is hidden.

Description

The ColumnVisibilityChanged event occurs after changing visibility of a tree column.

Comments

Layout of column headers is available if the TreeList.CaptionVisible property is set to true.

To show or hide tree column, press the button in the tree top right corner and in the drop-down menu select or deselect checkboxes for columns to show or hide.

Example

To execute the example, create the TreeList component named treeListSett. Add the ColumnVisibilityChanged and ColumnVisibilityChangingevent handlers:

treeListSett.ColumnVisibilityChanging.add(function (sender, args) {
   console.log("Visibility changing of column with index " + args.Column)
});
treeListSett.ColumnVisibilityChanged.add(function (sender, args) {
   if (args.Visibility == true) {
      console.log("Column with index " + args.Column + " is displayed")
   } else {
      console.log("Column with index " + args.Column + " is hidden")
   }
});

After executing the example, on changing of column visibility in tree, the following message is displayed to the console "Visibility changing of the column with index <column index>".

After visibility changing of the column the following message is displayed to the console "Column with the index <Column index> is shown/hidden".

See also:

TreeList