Back to Devexpress

CardViewTableLayoutSettings.RowsPerPage Property

aspnet-devexpress-dot-web-dot-cardviewtablelayoutsettings-3a2ac409.md

latest4.1 KB
Original Source

CardViewTableLayoutSettings.RowsPerPage Property

Gets or sets the number of rows that a page displays in table mode.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(3)]
public int RowsPerPage { get; set; }
vb
<DefaultValue(3)>
Public Property RowsPerPage As Integer

Property Value

TypeDefaultDescription
Int323

An Int32 value that specifies the number of rows displayed on a page.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to RowsPerPage
ASP.NET MVC ExtensionsCardViewPagerState

.SettingsTableLayout .RowsPerPage

| | ASP.NET Web Forms Controls | ASPxCardViewPagerSettings |

.SettingsTableLayout .RowsPerPage

|

Remarks

Use the RowsPerPage property to specify the number of rows that a page displays when the ASPxCardViewSettings.LayoutMode property is set to Table. The number of columns can be specified via the CardViewTableLayoutSettings.ColumnCount property.

If the ASPxCardView displays cards in a flow layout (the ASPxCardViewSettings.LayoutMode property is set to Flow ), the number of cards on a page can be specified via the CardViewFlowLayoutSettings.ItemsPerPage property.

Example

To see data export in action, refer to the following online demo: Exporting to PDF, XLS, XLSX, RTF.

csharp
public partial class Exporting_Exporting : System.Web.UI.Page {
    protected void btnPdfExport_Click(object sender, EventArgs e) {
        cardViewExport.WritePdfToResponse();
    }
    protected void btnXlsExport_Click(object sender, EventArgs e) {
        cardViewExport.WriteXlsToResponse(new XlsExportOptionsEx() { ExportType = ExportType.DataAware });
    }
    protected void btnXlsxExport_Click(object sender, EventArgs e) {
        cardViewExport.WriteXlsxToResponse(new XlsxExportOptionsEx() { ExportType = ExportType.DataAware });
    }
    protected void btnRtfExport_Click(object sender, EventArgs e) {
        cardViewExport.WriteRtfToResponse();
    }
}
aspx
<dx:ASPxCardView ID="cardView" runat="server" DataSourceID="ProductsDataSource" KeyFieldName="ProductID" AutoGenerateColumns="False">
    <Columns>
        ...
    </Columns>
    <CardLayoutProperties>
        ...
    </CardLayoutProperties>
    <SettingsPager>
        <SettingsTableLayout RowsPerPage="2" ColumnCount="2" />
    </SettingsPager>
    <Styles>
        <Card Height="1" />
    </Styles>
</dx:ASPxCardView>
<dx:ASPxCardViewExporter ID="cardViewExport" runat="server" CardViewID="cardView" CardWidth="300" />

See Also

LayoutMode

ColumnCount

Card View

CardViewTableLayoutSettings Class

CardViewTableLayoutSettings Members

DevExpress.Web Namespace