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
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);
        }
Beispiel #2
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);
        }