ASPxDataView.ColumnCount Property
OBSOLETE
Use the SettingsTableLayout.ColumnCount property instead.
Gets or sets the number of columns displayed within a page.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
[DefaultValue(3)]
[Obsolete("Use the SettingsTableLayout.ColumnCount property instead.")]
public int ColumnCount { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Int32 | 3 | An integer value that specifies the number of columns displayed within a page. |
Example
This example demonstrates how the ASPxDataView control can be customized to make use of the SEO-friendly paging feature.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxDataView" TagPrefix="dxdv" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>SEO-friendly paging</title>
</head>
<body>
<form id="form1" runat="server">
<dxdv:ASPxDataView ID="ASPxDataView1" runat="server"
DataSourceID="dsSampleDataSource" RowPerPage="2" ColumnCount="2">
<PagerSettings SEOFriendly="Enabled"></PagerSettings>
<ItemTemplate>
<b>CustomerID</b>: <asp:Label Text='<%# Eval("CustomerID") %>'
runat="server" ID="CustomerIDLabel" /><br/>
<b>ContactName</b>: <asp:Label Text='<%# Eval("ContactName") %>'
runat="server" ID="ContactNameLabel" /><br/>
<b>City</b>: <asp:Label Text='<%# Eval("City") %>' runat="server"
ID="CityLabel" /><br/>
</ItemTemplate>
</dxdv:ASPxDataView>
<asp:AccessDataSource ID="dsSampleDataSource" runat="server"
DataFile="~/App_Data/nwind.mdb"
SelectCommand="SELECT [CustomerID], [ContactName], [City] FROM [Customers]">
</asp:AccessDataSource>
</form>
</body>
</html>
See Also