Back to Devexpress

DataControlBase.BandsSource Property

wpf-devexpress-dot-xpf-dot-grid-dot-datacontrolbase-213cd332.md

latest1.9 KB
Original Source

DataControlBase.BandsSource Property

Gets or sets the source from which the grid generates bands. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public IEnumerable BandsSource { get; set; }
vb
Public Property BandsSource As IEnumerable

Property Value

TypeDescription
IEnumerable

The source from which the grid generates bands.

|

Remarks

You can define bands in a ViewModel and display them in the GridControl. To do this, follow the steps below:

  1. Create a collection of grid bands in a ViewModel.

  2. Specify a data template that generates bands:

  3. Assign the band collection to the BandsSource property and the band template to the DataControlBase.BandGeneratorTemplate property:

Note

You cannot specify the BandsSource and DataControlBase.ColumnsSource properties simultaneously.

Refer to the following help topic for more information: How to: Bind the Grid to Bands Specified in ViewModel.

See Also

DataControlBase Class

DataControlBase Members

DevExpress.Xpf.Grid Namespace