ColumnChooserElement
This is a form containing the hidden columns in RadGridView
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class ColumnChooserElement : ColumnChooserVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IGridView, IGridViewEventListener
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementGridVisualElementColumnChooserVisualElementColumnChooserElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the ColumnChooserElement class.
public ColumnChooserElement()
Properties
Columns
IList<GridViewColumn>
Gets list of GridViewDataColumn objects contained in the ColumnChooserElement
public IList<GridViewColumn> Columns { get; }
Controls whether the chooser lists all eligible columns or only eligible columns that are hidden.
public ColumnChooserColumnsDisplayMode ColumnsDisplayMode { get; set; }
Gets an instance of the StackLayoutElement class that represents the layout panel which holds the column chooser items.
[Browsable(false)]
public StackLayoutElement ElementsHolder { get; }
Gets or sets a value indicating whether the filter text box is visible.
public bool EnableFiltering { get; set; }
Gets the filter text box of this column chooser element
public RadTextBoxElement FilterTextBox { get; }
Gets or sets the GridVisualElement that owns this view.
public RadGridViewElement GridViewElement { get; set; }
Implements:
Gets the scroll viewer.
public RadScrollViewer ScrollViewer { get; }
The scroll viewer.
Gets or sets the sort order of the columns.
public RadSortOrder SortOrder { get; set; }
The sort order.
Gets the GridViewInfo that this view represents.
public GridViewInfo ViewInfo { get; }
Implements:
Gets or sets the GridViewTemplate associated with this column chooser
public GridViewTemplate ViewTemplate { get; set; }
Methods
Compares the columns.
protected virtual int CompareColumns(GridViewColumn x, GridViewColumn y)
The x column.
yGridViewColumnThe y column.
Returns:Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
Creates the filter text box.
Uninitializes the associated instance of the GridViewTemplate in ColumnChooserElement.
public void Detach()
Implements:
Disposes the managed resources.
protected override void DisposeManagedResources()
Overrides:
Initializes ColumnChooserElement with new instance of the GridViewTemplate.
public void Initialize(RadGridViewElement gridViewElement, GridViewInfo viewInfo)
An instance of the RadGridViewElement.
viewInfoGridViewInfoImplements:
Initializes the fields.
protected override void InitializeFields()
Overrides:
Measures the space required by the RadElement Used by the layout system.
protected override SizeF MeasureOverride(SizeF availableSize)
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)
Returns:The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides:
In this method call to the Measure method of each child must be made.
Fires the event.
protected virtual void OnItemElementCreating(object sender, ColumnChooserItemElementCreatingEventArgs e)
Passes the filter.
protected virtual bool PassesFilter(ColumnChooserItem item, string filter)
The item.
filterstringThe filter.
Returns:Matches the column header against the filter using ordinal, case-insensitive search.
protected virtual bool PassesFilter(GridViewColumn column, string filter)
The column to test.
filterstringThe text to find in the column header.
Returns:true when the header contains the filter text; otherwise, false.
Processes the drag over behavior.
protected override bool ProcessDragOver(Point currentMouseLocation, ISupportDrag dragObject)
The current mouse location.
dragObjectISupportDragThe drag object.
Returns:Overrides:
Removes the filter text and template-column collection subscriptions.
protected virtual void UnwireEvents()
Updates the child elements collection of the ColumnChooserElement.
public void UpdateView()
Implements:
Subscribes the filter text box to its text-change handler.
protected virtual void WireEvents()
Events
Occurs when a new item element is being created. The created item is then added to the Column chooser.
public event ColumnChooserItemElementCreatingEventHandler ItemElementCreating