RebuildColumns() public method

Rebuild the columns based upon its current view and column visibility settings
public RebuildColumns ( ) : void
return void
Beispiel #1
0
 /// <summary>
 /// Post process columns after creating them and adding them to the AllColumns collection.
 /// </summary>
 /// <param name="olv"></param>
 public virtual void PostCreateColumns(ObjectListView olv)
 {
     if (olv.AllColumns.Exists(delegate(OLVColumn x) { return(x.CheckBoxes); }))
     {
         olv.UseSubItemCheckBoxes = true;
     }
     if (olv.AllColumns.Exists(delegate(OLVColumn x) { return(x.Index > 0 && (x.ImageGetter != null || !String.IsNullOrEmpty(x.ImageAspectName))); }))
     {
         olv.ShowImagesOnSubItems = true;
     }
     olv.RebuildColumns();
     olv.AutoSizeColumns();
 }
 static private void ReplaceColumns(ObjectListView olv, IList<OLVColumn> columns) {
     olv.Clear();
     olv.AllColumns.Clear();
     olv.PrimarySortColumn = null;
     olv.SecondarySortColumn = null;
     if (columns.Count > 0) {
         olv.AllColumns.AddRange(columns);
         olv.RebuildColumns();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Post process columns after creating them and adding them to the AllColumns collection.
 /// </summary>
 /// <param name="olv"></param>
 public virtual void PostCreateColumns(ObjectListView olv) {
     if (olv.AllColumns.Exists(delegate(OLVColumn x) { return x.CheckBoxes; }))
         olv.UseSubItemCheckBoxes = true;
     if (olv.AllColumns.Exists(delegate(OLVColumn x) { return x.Index > 0 && (x.ImageGetter != null || !String.IsNullOrEmpty(x.ImageAspectName)); }))
         olv.ShowImagesOnSubItems = true;
     olv.RebuildColumns();
     olv.AutoSizeColumns();
 }