BrightIdeasSoftware.ObjectListView.Reset C# (CSharp) Method

Reset() public method

Make the list forget everything -- all rows and all columns
Use ClearObjects if you want to remove just the rows.
public Reset ( ) : void
return void
        public virtual void Reset()
        {
            this.Clear();
            this.AllColumns.Clear();
            this.ClearObjects();
            this.PrimarySortColumn = null;
            this.SecondarySortColumn = null;
            this.ClearPersistentCheckState();
            this.ClearUrlVisited();
            this.ClearHotItem();
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Replace all the columns in the given listview with the given list of columns.
        /// </summary>
        /// <param name="olv"></param>
        /// <param name="columns"></param>
        protected virtual void ReplaceColumns(ObjectListView olv, IList <OLVColumn> columns)
        {
            olv.Reset();

            // Are there new columns to add?
            if (columns == null || columns.Count == 0)
            {
                return;
            }

            // Setup the columns
            olv.AllColumns.AddRange(columns);
            this.PostCreateColumns(olv);
        }
All Usage Examples Of BrightIdeasSoftware.ObjectListView::Reset
ObjectListView