Clear Method - Column Headers

This method clears all column headers and list items from the control.

object.Clear()

Client support

   Newlook Smartclient only.

Parameters

None.

Returns

Returns a Boolean indicating the success or failure of the action.

Use

It is worth noting that the View property of a ListView control must be set to Report, in order to render columns in a ListView control. Using this method with the ColumnHeaders collection removes all columns and items. If you are only wanting to clear all items but keep the columns, use this method with the ListItems collection instead.

Examples

The following example removes all column headers and list items from a ListView control :

JSCRIPT

function ClearListView()

{

//Clear existing column headers and list items from the list view control

var clearSuccess = App.ActiveForm.lvTest.ColumnHeaders.Clear();

 

//Refresh list

App.RefreshForm();

}

Use the RefreshForm method to update the contents of the control after this method has been invoked if necessary.

See Also

Add Method - ListItems | Remove Method - ListView Column Headers

Applies To

ListView ColumnHeaders collection


© 2004-2021 looksoftware. All rights reserved.