This method clears all column headers and list items from the control.
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, 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.
The following example removes all column headers and list items from a ListView control : JSCRIPTfunction 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.
Add Method - ListItems | Remove Method - ListView Column Headers
ListView ColumnHeaders collection
© 2004-2021 looksoftware. All rights reserved.