aspnet-devexpress-dot-web-dot-aspxgridview-adc371e5.md
Gets a collection of visible columns within the ASPxGridView.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public ReadOnlyGridColumnCollection<GridViewColumn> VisibleColumns { get; }
Public ReadOnly Property VisibleColumns As ReadOnlyGridColumnCollection(Of GridViewColumn)
| Type | Description |
|---|---|
| ReadOnlyGridColumnCollection<GridViewColumn> |
A collection of visible columns in ASPxGridView.
|
The VisibleColumns collection contains the columns with the Visible property set to true. To access the collection that contains all the columns owned by the ASPxGridView, use the ASPxGridView.AllColumns property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the VisibleColumns property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-mvc-grid-create-report-based-on-grid-layout/CS/E4755/Models/MVCxGridViewState.cs#L11
public MVCxGridViewState(MVCxGridView gridView) {
Columns = new GridViewDataColumnStateCollection(gridView.VisibleColumns);
GroupedColumns = new GridViewDataColumnStateCollection(gridView.GetGroupedColumns());
asp-net-web-forms-grid-create-report-based-on-grid-layout/CS/WebApplication1/ReportHelper.cs#L205
List<GridViewDataColumn> columns = new List<GridViewDataColumn>();
foreach(GridViewColumn column in aspxGridView1.VisibleColumns) {
if(column is GridViewDataColumn)
asp-net-mvc-grid-create-report-based-on-grid-layout/VB/E4755/Models/MVCxGridViewState.vb#L68
Public Sub New(ByVal gridView As MVCxGridView)
Columns = New GridViewDataColumnStateCollection(gridView.VisibleColumns)
GroupedColumns = New GridViewDataColumnStateCollection(gridView.GetGroupedColumns())
asp-net-web-forms-grid-create-report-based-on-grid-layout/VB/WebApplication1/ReportHelper.vb#L215
Dim columns As New List(Of GridViewDataColumn)()
For Each column As GridViewColumn In aspxGridView1.VisibleColumns
If TypeOf column Is GridViewDataColumn Then
See Also