Skip to main content

BootstrapGridView Class

A control that provides a two-dimensional representation of data from a data source in grid format.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v24.1.dll

NuGet Package: DevExpress.Web.Bootstrap

Declaration

[DXClientDocumentationProviderWeb("BootstrapGridView")]
[ToolboxTabName("DX.24.1: Bootstrap Controls")]
public class BootstrapGridView :
    ASPxGridView,
    ISimpleRenderControl,
    IBootstrapGridCssClassesOwner

Remarks

The BootstrapGridView is a data-bound control that provides a two-dimensional representation of data from a data source in grid format. Data source fields and records are presented as columns and rows in a table.

BootstrapGrid_DataSummaries

Columns

The BootstrapGridView control stores its columns in the BootstrapGridView.Columns collection.

Data columns can be automatically created for each field in the data source when the BootstrapGridView is rendered, or created manually, based on the ASPxGridView.AutoGenerateColumns property value. By default, the property is set to true, forcing the BootstrapGridView to render each field from the data source as a data column. The order of columns is the same as the order of fields in the data source.

To manually control which columns appear in the BootstrapGridView, set the ASPxGridView.AutoGenerateColumns property to false. In this case, you should manually add data columns to the BootstrapGridView.Columns collection.

Client-Side API

The BootstrapGridView control provides you with comprehensive client-side functionality implemented using JavaScript code:

The client-side API is always available for this control.

Example

The example demonstrates the basic functionality of the Grid View control.

The image below shows the result:

BootstrapGridView_Example_Overview

<dx:BootstrapGridView ID="GridViewServerMode" runat="server" DataSourceID="EntityServerModeDataSource" KeyFieldName="ID" AutoGenerateColumns="False"
    OnCustomColumnDisplayText="GridViewServerMode_CustomColumnDisplayText" OnSummaryDisplayText="GridViewServerMode_SummaryDisplayText">
    <Columns>
        <dx:BootstrapGridViewTextColumn FieldName="From" />
        <dx:BootstrapGridViewTextColumn FieldName="Subject" />
        <dx:BootstrapGridViewDateColumn FieldName="Sent" Width="220px" />
        <dx:BootstrapGridViewCheckColumn Caption="Has Attachments" FieldName="HasAttachment" Width="150px" />
        <dx:BootstrapGridViewTextColumn FieldName="Size">
            <Settings AllowAutoFilter="False" />
        </dx:BootstrapGridViewTextColumn>
    </Columns>
    <TotalSummary>
        <dx:ASPxSummaryItem FieldName="Size" SummaryType="Sum" />
    </TotalSummary>
    <GroupSummary>
        <dx:ASPxSummaryItem SummaryType="Count" />
    </GroupSummary>
    <Settings ShowGroupPanel="True" ShowFooter="True" ShowFilterRow="true" ShowFilterRowMenu="true"/>
</dx:BootstrapGridView>
<dx:EntityServerModeDataSource ID="EntityServerModeDataSource" runat="server"
See Also