LastClickedColumn Property

Returns the last ColumnHeader clicked. Read-only runtime property.

object.LastClickedColumn = [object]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and object is the ColumnHeader object that was last clicked by the user.

Client support

   Newlook Smartclient only.

Version Support

Introduced in Version 11.0.

Use

This property replaces the deprecated LastColumnClicked property. LastColumnClicked returns the index of the column clicked by the user, whereas this property returns the entire ColumnHeader object (the index can be accessed via LastClickedColumn.Index).

This property is useful if you wish to return a property of the last ColumnHeader clicked by the user, for instance its Text value.

EXAMPLE

The following JScript runs on the OnColumnClick event of the lvItems list view control, and returns the ColumnHeader clicked by the user. It then sets a label on the form with the Text value of the clicked column header.

J SCRIPT

function OnItemClick()

{

var listView = App.ActiveForm.lvItems;

var columnText = "";

if (null != listView.LastClickedColumn)

  columnText = listView.LastClickedColumn.Text;

 

//Set the label caption to the text of the clicked column header.

App.ActiveForm.lbColumnText.Caption = columnText;

}

See Also

OnColumnClick property | LastClickedItem property | EnsureVisible method

Applies To

ListView control


© 2004-2021 looksoftware. All rights reserved.