This method clears all the list items in the ListView control.
ListView object.Clear()
Newlook Smartclient only.
None.
Returns a Boolean indicating the success or failure of the action.
It is worth noting that the View property of a ListView control must be set to Report, to render columns in the ListView control. Calling this method will only remove the list items but not the columns. If you wish to remove all list items and columns, use the Clear method with the Column Headers collection instead.
The following example removes all list items from a ListView control : JSCRIPTfunction ClearListView() { //Clear existing list items from the list view control var clearSuccess = App.ActiveForm.lvTest.ListItems.Clear();
//Refresh list App.RefreshForm(); } |
Use the RefreshForm method to update the contents of the control after this method has been invoked if necessary.
Add Method - ColumnHeaders | Remove Method - ListView Column Headers
© 2004-2021 looksoftware. All rights reserved.