DetailsView DetailsView DetailsView DetailsView Class

Definition

Displays the values of a single record from a data source in a table, where each data row represents a field of the record. The DetailsView control allows you to edit, delete, and insert records.

public ref class DetailsView : System::Web::UI::WebControls::CompositeDataBoundControl, System::Web::UI::ICallbackEventHandler, System::Web::UI::IDataItemContainer, System::Web::UI::IPostBackEventHandler, System::Web::UI::WebControls::ICallbackContainer, System::Web::UI::WebControls::IDataBoundItemControl, System::Web::UI::WebControls::IFieldControl, System::Web::UI::WebControls::IPostBackContainer
[System.Web.UI.ControlValueProperty("SelectedValue")]
public class DetailsView : System.Web.UI.WebControls.CompositeDataBoundControl, System.Web.UI.ICallbackEventHandler, System.Web.UI.IDataItemContainer, System.Web.UI.IPostBackEventHandler, System.Web.UI.WebControls.ICallbackContainer, System.Web.UI.WebControls.IDataBoundItemControl, System.Web.UI.WebControls.IFieldControl, System.Web.UI.WebControls.IPostBackContainer
type DetailsView = class
    inherit CompositeDataBoundControl
    interface IDataItemContainer
    interface INamingContainer
    interface ICallbackContainer
    interface ICallbackEventHandler
    interface IPostBackEventHandler
    interface IPostBackContainer
    interface IDataBoundItemControl
    interface IDataBoundControl
    interface IFieldControl
Public Class DetailsView
Inherits CompositeDataBoundControl
Implements ICallbackContainer, ICallbackEventHandler, IDataBoundItemControl, IDataItemContainer, IFieldControl, IPostBackContainer, IPostBackEventHandler
Inheritance
Attributes
Implements

Examples

The following code example demonstrates how to use to use a DetailsView control in combination with a GridView control for a simple master-detail scenario. It displays the details of an item selected in the GridView control.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <table>
        <tr>
          <td>
            <asp:GridView ID="GridView1" runat="server" 
              AutoGenerateColumns="False" DataSourceID="Customers"
              DataKeyNames="CustomerID">
              <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
                <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              </Columns>
            </asp:GridView>
          </td>
          <td valign="top">
            <asp:DetailsView ID="DetailsView1" runat="server" 
              AutoGenerateRows="True" DataKeyNames="CustomerID"
              DataSourceID="Details" Height="50px" Width="301px">
            </asp:DetailsView>
          </td>
        </tr>
      </table>
      &nbsp;&nbsp;
      <asp:SqlDataSource ID="Details" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @CustomerID)">
        <SelectParameters>
          <asp:ControlParameter ControlID="GridView1" Name="CustomerID" 
            PropertyName="SelectedValue"
            Type="String" />
        </SelectParameters>
      </asp:SqlDataSource>
      <asp:SqlDataSource ID="Customers" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] FROM [Customers]">
      </asp:SqlDataSource>
    </div>
  </form>
</body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <table>
        <tr>
          <td>
            <asp:GridView ID="GridView1" runat="server" 
              AutoGenerateColumns="False" DataSourceID="Customers"
              DataKeyNames="CustomerID">
              <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
                <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              </Columns>
            </asp:GridView>
          </td>
          <td valign="top">
            <asp:DetailsView ID="DetailsView1" runat="server" 
              AutoGenerateRows="True" DataKeyNames="CustomerID"
              DataSourceID="Details" Height="50px" Width="301px">
            </asp:DetailsView>
          </td>
        </tr>
      </table>
      &nbsp;&nbsp;
      <asp:SqlDataSource ID="Details" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @CustomerID)">
        <SelectParameters>
          <asp:ControlParameter ControlID="GridView1" Name="CustomerID" 
            PropertyName="SelectedValue"
            Type="String" />
        </SelectParameters>
      </asp:SqlDataSource>
      <asp:SqlDataSource ID="Customers" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] FROM [Customers]">
      </asp:SqlDataSource>
    </div>
  </form>
</body>
</html>

The following code example demonstrates how to use the DetailsView control to add, delete, and edit records.


<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  void CustomerDetail_ItemInserted(object sender, 
    DetailsViewInsertedEventArgs e)
  {
    // Refresh the GridView control after a new record is inserted 
    // in the DetailsView control.
    CustomersView.DataBind();
  }

  void CustomerDetail_ItemInserting(object sender, 
    DetailsViewInsertEventArgs e)
  {
    // Iterate though the values entered by the user and HTML encode 
    // the values. This helps prevent malicious values from being 
    // stored in the data source.
    for (int i = 0; i < e.Values.Count; i++)
    {
      if (e.Values[i] != null)
      {
        e.Values[i] = Server.HtmlEncode(e.Values[i].ToString());
      }
    }
  }

  void CustomerDetail_ItemUpdated(object sender, 
    DetailsViewUpdatedEventArgs e)
  {
    // Refresh the GridView control after a new record is updated 
    // in the DetailsView control.
    CustomersView.DataBind();
  }

  void CustomerDetail_ItemUpdating(object sender, 
    DetailsViewUpdateEventArgs e)
  {
    // Iterate though the values entered by the user and HTML encode 
    // the values. This helps prevent malicious values from being 
    // stored in the data source.
    for (int i = 0; i < e.NewValues.Count; i++)
    {
      if (e.NewValues[i] != null)
      {
        e.NewValues[i] = Server.HtmlEncode(e.NewValues[i].ToString());
      }
    }
  }

  void CustomerDetail_ItemDeleted(object sender, 
    DetailsViewDeletedEventArgs e)
  {
    // Refresh the GridView control after a new record is updated 
    // in the DetailsView control.
    CustomersView.DataBind();
  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>
      DetailsView Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <h3>
      DetailsView Example</h3>
    <table cellspacing="10">
      <tr>
        <td>
          <!-- Use a GridView control in combination with      -->
          <!-- a DetailsView control to display master-detail  -->
          <!-- information. When the user selects a store from -->
          <!-- GridView control, the customers//s detailed     -->
          <!-- information is displayed in the DetailsView     -->
          <!-- control.                                        -->
          <asp:GridView ID="CustomersView" DataSourceID="Customers" 
            AutoGenerateColumns="False"
            DataKeyNames="CustomerID" runat="server">
            <HeaderStyle BackColor="Blue" ForeColor="White" />
            <Columns>
              <asp:CommandField ShowSelectButton="True" />
              <asp:BoundField DataField="ContactName" 
                HeaderText="ContactName" />
              <asp:BoundField DataField="CompanyName" 
                HeaderText="CompanyName" />
            </Columns>
          </asp:GridView>
        </td>
        <td valign="top">
          <asp:DetailsView ID="CustomerDetail" 
            DataSourceID="Details" AutoGenerateRows="false"
            AutoGenerateInsertButton="true" 
            AutoGenerateEditButton="true" 
            AutoGenerateDeleteButton="true"
            EmptyDataText="No records." 
            DataKeyNames="CustomerID" GridLines="Both" 
            OnItemInserted="CustomerDetail_ItemInserted"
            OnItemInserting="CustomerDetail_ItemInserting" 
            OnItemUpdated="CustomerDetail_ItemUpdated"
            OnItemUpdating="CustomerDetail_ItemUpdating" 
            OnItemDeleted="CustomerDetail_ItemDeleted"
            runat="server">
            <HeaderStyle BackColor="Navy" ForeColor="White" />
            <RowStyle BackColor="White" />
            <AlternatingRowStyle BackColor="LightGray" />
            <EditRowStyle BackColor="LightCyan" />
            <Fields>
              <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              <asp:BoundField DataField="Address" HeaderText="Address" />
              <asp:BoundField DataField="City" HeaderText="City" />
              <asp:BoundField DataField="Region" HeaderText="Region" />
              <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" />
              <asp:BoundField DataField="Country" HeaderText="Country" />
              <asp:BoundField DataField="Phone" HeaderText="Phone" />
              <asp:BoundField DataField="Fax" HeaderText="Fax" />
            </Fields>
          </asp:DetailsView>
        </td>
      </tr>
    </table>
    <!-- This example uses Microsoft SQL Server and connects -->
    <!-- to the Northwind sample database.                   -->
    <!-- It is strongly recommended that each data-bound     -->
    <!-- control uses a separate data source control.        -->
    <asp:SqlDataSource ID="Customers" runat="server" 
      ConnectionString=
        "<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] 
        FROM [Customers]">
    </asp:SqlDataSource>
    <!-- Add a filter to the data source control for the     -->
    <!-- DetailsView control to display the details of the   -->
    <!-- store selected in the GridView control.             -->
    <asp:SqlDataSource ID="Details" 
      ConnectionString=
        "<%$ ConnectionStrings:NorthwindConnectionString %>"
      runat="server" 
      SelectCommand="SELECT * FROM [Customers] 
        WHERE ([CustomerID] = @CustomerID)"
      DeleteCommand="DELETE FROM [Customers] 
        WHERE [CustomerID] = @CustomerID"
      InsertCommand="INSERT INTO [Customers] ([CustomerID], 
        [CompanyName], [ContactName], [ContactTitle], [Address], 
        [City], [Region], [PostalCode], [Country], [Phone], [Fax]) 
        VALUES (@CustomerID, @CompanyName, @ContactName, @ContactTitle, 
        @Address, @City, @Region, @PostalCode, @Country, @Phone, @Fax)"
      UpdateCommand="UPDATE [Customers] SET [CompanyName] = @CompanyName, 
        [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, 
        [Address] = @Address, [City] = @City, [Region] = @Region, 
        [PostalCode] = @PostalCode, [Country] = @Country, 
        [Phone] = @Phone, [Fax] = @Fax 
        WHERE [CustomerID] = @CustomerID">
      <SelectParameters>
        <asp:ControlParameter ControlID="CustomersView" 
          Name="CustomerID" PropertyName="SelectedValue"
          Type="String" />
      </SelectParameters>
      <DeleteParameters>
        <asp:Parameter Name="CustomerID" Type="String" />
      </DeleteParameters>
      <UpdateParameters>
        <asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="ContactName" Type="String" />
        <asp:Parameter Name="ContactTitle" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Region" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
        <asp:Parameter Name="Country" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
        <asp:Parameter Name="CustomerID" Type="String" />
      </UpdateParameters>
      <InsertParameters>
        <asp:Parameter Name="CustomerID" Type="String" />
        <asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="ContactName" Type="String" />
        <asp:Parameter Name="ContactTitle" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Region" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
        <asp:Parameter Name="Country" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
      </InsertParameters>
    </asp:SqlDataSource>
  </form>
</body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
  Sub CustomerDetail_ItemInserted(ByVal sender As Object, _
    ByVal e As DetailsViewInsertedEventArgs)
    ' Refresh the GridView control after a new record is inserted in 
    ' the DetailsView control.
    CustomersView.DataBind()
  End Sub
  
  Sub CustomerDetail_ItemInserting(ByVal sender As Object, _
    ByVal e As DetailsViewInsertEventArgs)
    ' Iterate though the values entered by the user and HTML encode 
    ' the values. This helps prevent malicious values from being 
    ' stored in the data source.
    For i As Integer = 0 To e.Values.Count - 1
      If e.Values(i) IsNot Nothing Then
        e.Values(i) = Server.HtmlEncode(e.Values(i).ToString())
      End If
    Next
  End Sub
  
  Sub CustomerDetail_ItemUpdated(ByVal sender As Object, _
    ByVal e As DetailsViewUpdatedEventArgs)
    ' Refresh the GridView control after a new record is updated 
    ' in the DetailsView control.
    CustomersView.DataBind()
  End Sub
  
  Sub CustomerDetail_ItemUpdating(ByVal sender As Object, _
    ByVal e As DetailsViewUpdateEventArgs)
    ' Iterate though the values entered by the user and HTML encode 
    ' the values. This helps prevent malicious values from being 
    ' stored in the data source.
    For i As Integer = 0 To e.NewValues.Count - 1
      If e.NewValues(i) IsNot Nothing Then
        e.NewValues(i) = Server.HtmlEncode(e.NewValues(i).ToString())
      End If
    Next
  End Sub
  
  Sub CustomerDetail_ItemDeleted(ByVal sender As Object, _
    ByVal e As DetailsViewDeletedEventArgs)
    ' Refresh the GridView control after a new record is updated 
    ' in the DetailsView control.
    CustomersView.DataBind()
  End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>DetailsView Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <h3>DetailsView Example</h3>
    <table cellspacing="10">
      <tr>
        <td>
          <!-- Use a GridView control in combination with      -->
          <!-- a DetailsView control to display master-detail  -->
          <!-- information. When the user selects a store from -->
          <!-- GridView control, the customers's detailed      -->
          <!-- information is displayed in the DetailsView     -->
          <!-- control.                                        -->
          <asp:GridView ID="CustomersView" DataSourceID="Customers" 
            AutoGenerateColumns="False"
            DataKeyNames="CustomerID" runat="server">
            <HeaderStyle BackColor="Blue" ForeColor="White" />
            <Columns>
              <asp:CommandField ShowSelectButton="True" />
              <asp:BoundField DataField="ContactName" 
                HeaderText="ContactName" />
              <asp:BoundField DataField="CompanyName" 
                HeaderText="CompanyName" />
            </Columns>
          </asp:GridView>
        </td>
        <td valign="top">
          <asp:DetailsView ID="CustomerDetail" DataSourceID="Details" 
            AutoGenerateRows="false"
            AutoGenerateInsertButton="true" 
            AutoGenerateEditButton="true" 
            AutoGenerateDeleteButton="true"
            EmptyDataText="No records." 
            DataKeyNames="CustomerID" GridLines="Both" 
            OnItemInserted="CustomerDetail_ItemInserted"
            OnItemInserting="CustomerDetail_ItemInserting" 
            OnItemUpdated="CustomerDetail_ItemUpdated"
            OnItemUpdating="CustomerDetail_ItemUpdating" 
            OnItemDeleted="CustomerDetail_ItemDeleted"
            runat="server">
            <HeaderStyle BackColor="Navy" ForeColor="White" />
            <RowStyle BackColor="White" />
            <AlternatingRowStyle BackColor="LightGray" />
            <EditRowStyle BackColor="LightCyan" />
            <Fields>
              <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                ReadOnly="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              <asp:BoundField DataField="Address" HeaderText="Address" />
              <asp:BoundField DataField="City" HeaderText="City" />
              <asp:BoundField DataField="Region" HeaderText="Region" />
              <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" />
              <asp:BoundField DataField="Country" HeaderText="Country" />
              <asp:BoundField DataField="Phone" HeaderText="Phone" />
              <asp:BoundField DataField="Fax" HeaderText="Fax" />
            </Fields>
          </asp:DetailsView>
        </td>
      </tr>
    </table>
    <!-- This example uses Microsoft SQL Server and connects -->
    <!-- to the Northwind sample database.                   -->
    <!-- It is strongly recommended that each data-bound     -->
    <!-- control uses a separate data source control.        -->
    <asp:SqlDataSource ID="Customers" runat="server" 
      ConnectionString=
        "<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] 
        FROM [Customers]">
    </asp:SqlDataSource>
    <!-- Add a filter to the data source control for the     -->
    <!-- DetailsView control to display the details of the   -->
    <!-- store selected in the GridView control.             -->
    <asp:SqlDataSource ID="Details" 
      ConnectionString=
        "<%$ ConnectionStrings:NorthwindConnectionString %>"
      runat="server" 
      SelectCommand="SELECT * FROM [Customers] 
        WHERE ([CustomerID] = @CustomerID)"
      DeleteCommand="DELETE FROM [Customers] 
        WHERE [CustomerID] = @CustomerID"
      InsertCommand="INSERT INTO [Customers] ([CustomerID], 
        [CompanyName], [ContactName], [ContactTitle], [Address], 
        [City], [Region], [PostalCode], [Country], [Phone], [Fax]) 
        VALUES (@CustomerID, @CompanyName, @ContactName, 
        @ContactTitle, @Address, @City, @Region, @PostalCode, 
        @Country, @Phone, @Fax)"
      UpdateCommand="UPDATE [Customers] SET 
        [CompanyName] = @CompanyName, 
        [ContactName] = @ContactName, [ContactTitle] = @ContactTitle, 
        [Address] = @Address, [City] = @City, [Region] = @Region, 
        [PostalCode] = @PostalCode, [Country] = @Country, 
        [Phone] = @Phone, [Fax] = @Fax 
        WHERE [CustomerID] = @CustomerID">
      <SelectParameters>
        <asp:ControlParameter ControlID="CustomersView" 
          Name="CustomerID" PropertyName="SelectedValue"
          Type="String" />
      </SelectParameters>
      <DeleteParameters>
        <asp:Parameter Name="CustomerID" Type="String" />
      </DeleteParameters>
      <UpdateParameters>
        <asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="ContactName" Type="String" />
        <asp:Parameter Name="ContactTitle" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Region" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
        <asp:Parameter Name="Country" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
        <asp:Parameter Name="CustomerID" Type="String" />
      </UpdateParameters>
      <InsertParameters>
        <asp:Parameter Name="CustomerID" Type="String" />
        <asp:Parameter Name="CompanyName" Type="String" />
        <asp:Parameter Name="ContactName" Type="String" />
        <asp:Parameter Name="ContactTitle" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Region" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
        <asp:Parameter Name="Country" Type="String" />
        <asp:Parameter Name="Phone" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
      </InsertParameters>
    </asp:SqlDataSource>
  </form>
</body>
</html>

The following code example demonstrates how to declaratively add row fields to the DetailsView control.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <table cellspacing="10">
      <tr>
        <td>
          <!-- Use a GridView control in combination with      -->
          <!-- a DetailsView control to display master-detail  -->
          <!-- information. When the user selects a store from -->
          <!-- GridView control, the store's detailed          -->
          <!-- information is displayed in the DetailsView     -->
          <!-- control.                                        -->
          <asp:GridView ID="GridView1" runat="server" 
            DataSourceID="Customers" AutoGenerateColumns="False" 
            DataKeyNames="CustomerID">
            <Columns>
              <asp:CommandField ShowSelectButton="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
            </Columns>
          </asp:GridView>
        </td>
        <td valign="top">
          <asp:DetailsView ID="DetailsView" runat="server"
            DataSourceID="Details" AutoGenerateRows="false"
            DataKeyNames="CustomerID" >
            <HeaderStyle BackColor="Navy" ForeColor="White" />
            <Fields>
              <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                ReadOnly="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              <asp:BoundField DataField="City" HeaderText="City" />
              <asp:BoundField DataField="Region" HeaderText="Region" />
              <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" />
              <asp:BoundField DataField="Country" HeaderText="Country" />
            </Fields>
          </asp:DetailsView>
        </td>
      </tr>
    </table>
    <!-- This example uses Microsoft SQL Server and connects -->
    <!-- to the Northwind sample database.                        -->
    <!-- It is strongly recommended that each data-bound     -->
    <!-- control uses a separate data source control.        -->
    <asp:SqlDataSource ID="Customers" runat="server" 
      ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] FROM [Customers]">
    </asp:SqlDataSource>
    <!-- Add a filter to the data source control for the     -->
    <!-- DetailsView control to display the details of the   -->
    <!-- store selected in the GridView control.             -->
    <asp:SqlDataSource ID="Details" runat="server" 
      ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @CustomerID)">
      <SelectParameters>
        <asp:ControlParameter ControlID="GridView1" Name="CustomerID" 
          PropertyName="SelectedValue"
          Type="String" />
      </SelectParameters>
    </asp:SqlDataSource>
  </form>
</body>
</html>
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
  <form id="Form1" runat="server">
    <table cellspacing="10">
      <tr>
        <td>
          <!-- Use a GridView control in combination with      -->
          <!-- a DetailsView control to display master-detail  -->
          <!-- information. When the user selects a store from -->
          <!-- GridView control, the store's detailed          -->
          <!-- information is displayed in the DetailsView     -->
          <!-- control.                                        -->
          <asp:GridView ID="GridView1" runat="server" 
            DataSourceID="Customers" AutoGenerateColumns="False" 
            DataKeyNames="CustomerID">
            <Columns>
              <asp:CommandField ShowSelectButton="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
            </Columns>
          </asp:GridView>
        </td>
        <td valign="top">
          <asp:DetailsView ID="DetailsView" runat="server"
            DataSourceID="Details" AutoGenerateRows="false"
            DataKeyNames="CustomerID" >
            <HeaderStyle BackColor="Navy" ForeColor="White" />
            <Fields>
              <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                ReadOnly="True" />
              <asp:BoundField DataField="ContactName" HeaderText="ContactName" />
              <asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" />
              <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" />
              <asp:BoundField DataField="City" HeaderText="City" />
              <asp:BoundField DataField="Region" HeaderText="Region" />
              <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" />
              <asp:BoundField DataField="Country" HeaderText="Country" />
            </Fields>
          </asp:DetailsView>
        </td>
      </tr>
    </table>
    <!-- This example uses Microsoft SQL Server and connects -->
    <!-- to the Northwind sample database.                        -->
    <!-- It is strongly recommended that each data-bound     -->
    <!-- control uses a separate data source control.        -->
    <asp:SqlDataSource ID="Customers" runat="server" 
      ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT [CompanyName], [ContactName], [CustomerID] FROM [Customers]">
    </asp:SqlDataSource>
    <!-- Add a filter to the data source control for the     -->
    <!-- DetailsView control to display the details of the   -->
    <!-- store selected in the GridView control.             -->
    <asp:SqlDataSource ID="Details" runat="server" 
      ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
      SelectCommand="SELECT * FROM [Customers] WHERE ([CustomerID] = @CustomerID)">
      <SelectParameters>
        <asp:ControlParameter ControlID="GridView1" Name="CustomerID" 
          PropertyName="SelectedValue"
          Type="String" />
      </SelectParameters>
    </asp:SqlDataSource>
  </form>
</body>
</html>

Remarks

In this topic:

Introduction

The DetailsView control is used to display a single record from a data source in a table, where each field of the record is displayed in a row of the table. It can be used in combination with a GridView control for master-detail scenarios. The DetailsView control supports the following features:

  • Binding to data source controls, such as SqlDataSource.

  • Built-in inserting capabilities.

  • Built-in updating and deleting capabilities.

  • Built-in paging capabilities.

  • Programmatic access to the DetailsView object model to dynamically set properties, handle events, and so on.

  • Customizable appearance through themes and styles.

Row Fields

Each data row in the DetailsView control is created by declaring a field control. Different row field types determine the behavior of the rows in the control. Field controls derive from DataControlField. The following table lists the different row field types that can be used.

Column field type Description
BoundField Displays the value of a field in a data source as text.
ButtonField Displays a command button in the DetailsView control. This allows you to display a row with a custom button control, such as an Add or a Remove button.
CheckBoxField Displays a check box in the DetailsView control. This row field type is commonly used to display fields with a Boolean value.
CommandField Displays built-in command buttons to perform edit, insert, or delete operations in the DetailsView control.
HyperLinkField Displays the value of a field in a data source as a hyperlink. This row field type allows you to bind a second field to the hyperlink's URL.
ImageField Displays an image in the DetailsView control.
TemplateField Displays user-defined content for a row in the DetailsView control according to a specified template. This row field type allows you to create a custom row field.

By default, the AutoGenerateRows property is set to true, which automatically generates a bound row field object for each field of a bindable type in the data source. Valid bindable types are String, DateTime, Decimal, Guid, and the set of primitive types. Each field is then displayed in a row as text, in the order in which each field appears in the data source.

Automatically generating the rows provides a quick and easy way to display every field in the record. However, to make use of the DetailsView control's advanced capabilities you must explicitly declare the row fields to include in the DetailsView control. To declare the row fields, first set the AutoGenerateRows property to false. Next, add opening and closing <Fields> tags between the opening and closing tags of the DetailsView control. Finally, list the row fields that you want to include between the opening and closing <Fields> tags. The row fields specified are added to the Fields collection in the order listed. The Fields collection allows you to programmatically manage the row fields in the DetailsView control.

Note

Automatically generated row fields are not added to the Fields collection.

Note

Explicitly declared row fields can be displayed in combination with automatically generated row fields. When both are used, explicitly declared row fields are rendered first, followed by the automatically generated row fields.

Binding to Data

The DetailsView control can be bound to a data source control (such as the SqlDataSource control or ObjectDataSource control) or to any data source collection that implements the System.Collections.IEnumerable interface, such as System.Data.DataView, System.Collections.ArrayList, System.Collections.Generic.List<T>, or other collection types. Use one of the following methods to bind the DetailsView control to the appropriate data source type:

  • To bind to a data source control, set the DataSourceID property of the DetailsView control to the ID value of the data source control. The DetailsView control automatically binds to the specified data source control. This is the preferred method to bind to data.

  • To bind to a data source that implements the System.Collections.IEnumerable interface, programmatically set the DataSource property of the DetailsView control to the data source and then call the DataBind method.

For more information on data binding, see Binding to Databases.

Security

This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Script Exploits Overview. Validation server controls are also provided to assess user input. For more information, see Validation Server Control Syntax.

Data Operations

The DetailsView control provides built-in capabilities that allow the user to update, delete, insert, and page through items in the control. When the DetailsView control is bound to a data source control, the DetailsView control can take advantage of the data source control's capabilities and provide automatic updating, deleting, inserting, and paging functionality.

Note

The DetailsView control can provide support for update, delete, insert, and paging operations with other types of data sources; however, you must provide the implementation for these operations in an appropriate event handler. For more information, see ItemDeleting, ItemInserting, and ItemUpdating.

The DetailsView control can automatically add a CommandField row field with an Edit, Delete, or New button by setting the AutoGenerateEditButton, AutoGenerateDeleteButton, or AutoGenerateInsertButton properties to true, respectively. Unlike the Delete button (which deletes the selected record immediately), when the Edit or New button is clicked, the DetailsView control goes into edit or insert mode, respectively. In edit mode, the Edit button is replaced with an Update and a Cancel button. Input controls that are appropriate for the field's data type (such as a TextBox or a CheckBox control) are displayed with a field's value for the user to modify. Clicking the Update button updates the record in the data source, while clicking the Cancel button abandons any changes. Likewise, in insert mode, the New button is replaced with an Insert and a Cancel button, and empty input controls are displayed for the user to enter the values for the new record.

Note

You can also manually define the update, delete, and insert command buttons in a ButtonField, CommandField, or TemplateField row field. The DetailsView control recognizes buttons with the CommandName property set to "Edit", "Update", "Delete", "New", "Insert", or "Cancel"; however, you still must provide the functionality yourself. For more information, see ItemDeleting, ItemInserting, and ItemUpdating.

The DetailsView control provides a paging feature, which allows the user to navigate to other records in the data source. When enabled, page navigation controls are displayed in a pager row. To enable paging, set the AllowPaging property to true. The pager row can be customized using the PagerStyle and PagerSettings properties.

Customizing the User Interface

You can customize the appearance of the DetailsView control by setting the style properties for different parts of the control. The following table lists the style properties that you can set.

Style property Description
AlternatingRowStyle The style settings for the alternating data rows in the DetailsView control. When this property is set, the data rows are displayed in bands, alternating between the RowStyle settings and the AlternatingRowStyle settings.
CommandRowStyle The style settings for the row that contains the built-in command buttons.
EditRowStyle The style settings for the data rows when the DetailsView control is in edit mode.
EmptyDataRowStyle The style settings for the empty data row that are displayed in the DetailsView control when the data source does not contain any records.
FooterStyle The style settings for the footer row.
HeaderStyle The style settings for the header row.
InsertRowStyle The style settings for the data rows when the DetailsView control is in insert mode.
PagerStyle The style settings for the pager row.
RowStyle The style settings for the data rows in the DetailsView control. When the AlternatingRowStyle property is also set, the data rows are displayed alternating between the RowStyle settings and the AlternatingRowStyle settings.
FieldHeaderStyle The style settings for the header column.

Events

The DetailsView control provides several events that you can program against. This allows you to run a custom routine whenever an event occurs. The following table lists the events supported by the DetailsView control. The DetailsView control also inherits these events from its base classes: DataBinding, DataBound, Disposed, Init, Load, PreRender, and Render.

Event Description
ItemCommand Occurs when a button is clicked in the DetailsView control.
ItemCreated Occurs after all DetailsViewRow objects are created in the DetailsView control. This event is often used to modify the values of a record before it is displayed.
ItemDeleted Occurs when a Delete button is clicked, but after the DetailsView control deletes the record from the data source. This event is often used to check the results of the delete operation.
ItemDeleting Occurs when a Delete button is clicked, but before the DetailsView control deletes the record from the data source. This event is often used to cancel the delete operation.
ItemInserted Occurs when an Insert button is clicked, but after the DetailsView control inserts the record. This event is often used to check the results of the insert operation.
ItemInserting Occurs when an Insert button is clicked, but before the DetailsView control inserts the record. This event is often used to cancel the insert operation.
ItemUpdated Occurs when an Update button is clicked, but after the DetailsView control updates the row. This event is often used to check the results of the update operation.
ItemUpdating Occurs when an Update button is clicked, but before the DetailsView control updates the record. This event is often used to cancel the update operation.
ModeChanged Occurs after the DetailsView control changes modes (edit, insert, or read-only mode). This event is often used to perform a task when the DetailsView control changes modes.
ModeChanging Occurs before the DetailsView control changes modes (edit, insert, or read-only mode). This event is often used to cancel a mode change.
PageIndexChanged Occurs when one of the pager buttons is clicked, but after the DetailsView control handles the paging operation. This event is commonly used when you need to perform a task after the user navigates to a different record in the control.
PageIndexChanging Occurs when one of the pager buttons is clicked, but before the DetailsView control handles the paging operation. This event is often used to cancel the paging operation.

Accessibility

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio and ASP.NET and ASP.NET Controls and Accessibility.

Declarative Syntax

<asp:DetailsView  
    AccessKey="string"  
    AllowPaging="True|False"  
    AutoGenerateDeleteButton="True|False"  
    AutoGenerateEditButton="True|False"  
    AutoGenerateInsertButton="True|False"  
    AutoGenerateRows="True|False"  
    BackColor="color name|#dddddd"  
    BackImageUrl="uri"  
    BorderColor="color name|#dddddd"  
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|  
        Inset|Outset"  
    BorderWidth="size"  
    Caption="string"  
    CaptionAlign="NotSet|Top|Bottom|Left|Right"  
    CellPadding="integer"  
    CellSpacing="integer"  
    CssClass="string"  
    DataKeyNames="string"  
    DataMember="string"  
    DataSource="string"  
    DataSourceID="string"  
    DefaultMode="ReadOnly|Edit|Insert"  
    EmptyDataText="string"  
    Enabled="True|False"  
    EnablePagingCallbacks="True|False"  
    EnableTheming="True|False"  
    EnableViewState="True|False"  
    Font-Bold="True|False"  
    Font-Italic="True|False"  
    Font-Names="string"  
    Font-Overline="True|False"  
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|  
        Large|X-Large|XX-Large"  
    Font-Strikeout="True|False"  
    Font-Underline="True|False"  
    FooterText="string"  
    ForeColor="color name|#dddddd"  
    GridLines="None|Horizontal|Vertical|Both"  
    HeaderText="string"  
    Height="size"  
    HorizontalAlign="NotSet|Left|Center|Right|Justify"  
    ID="string"  
    OnDataBinding="DataBinding event handler"  
    OnDataBound="DataBound event handler"  
    OnDisposed="Disposed event handler"  
    OnInit="Init event handler"  
    OnItemCommand="ItemCommand event handler"  
    OnItemCreated="ItemCreated event handler"  
    OnItemDeleted="ItemDeleted event handler"  
    OnItemDeleting="ItemDeleting event handler"  
    OnItemInserted="ItemInserted event handler"  
    OnItemInserting="ItemInserting event handler"  
    OnItemUpdated="ItemUpdated event handler"  
    OnItemUpdating="ItemUpdating event handler"  
    OnLoad="Load event handler"  
    OnModeChanged="ModeChanged event handler"  
    OnModeChanging="ModeChanging event handler"  
    OnPageIndexChanged="PageIndexChanged event handler"  
    OnPageIndexChanging="PageIndexChanging event handler"  
    OnPreRender="PreRender event handler"  
    OnUnload="Unload event handler"  
    PageIndex="integer"  
    PagerSettings-FirstPageImageUrl="uri"  
    PagerSettings-FirstPageText="string"  
    PagerSettings-LastPageImageUrl="uri"  
    PagerSettings-LastPageText="string"  
    PagerSettings-Mode="NextPrevious|Numeric|NextPreviousFirstLast|NumericFirstLast"  
    PagerSettings-NextPageImageUrl="uri"  
    PagerSettings-NextPageText="string"  
    PagerSettings-PageButtonCount="integer"  
    PagerSettings-Position="Bottom|Top|TopAndBottom"  
    PagerSettings-PreviousPageImageUrl="uri"  
    PagerSettings-PreviousPageText="string"  
    PagerSettings-Visible="True|False"  
    runat="server"  
    SkinID="string"  
    Style="string"  
    TabIndex="integer"  
    ToolTip="string"  
    Visible="True|False"  
    Width="size"  
>  
        <AlternatingRowStyle />  
        <CommandRowStyle />  
        <EditRowStyle />  
        <EmptyDataRowStyle />  
        <EmptyDataTemplate>  
            <!-- child controls -->  
        </EmptyDataTemplate>  
        <FieldHeaderStyle />  
        <Fields>  
                <asp:BoundField  
                    AccessibleHeaderText="string"  
                    ApplyFormatInEditMode="True|False"  
                    ConvertEmptyStringToNull="True|False"  
                    DataField="string"  
                    DataFormatString="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    HtmlEncode="True|False"  
                    InsertVisible="True|False"  
                    NullDisplayText="string"  
                    ReadOnly="True|False"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:BoundField>  
                <asp:ButtonField  
                    AccessibleHeaderText="string"  
                    ButtonType="Button|Image|Link"  
                    CausesValidation="True|False"  
                    CommandName="string"  
                    DataTextField="string"  
                    DataTextFormatString="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    ImageUrl="uri"  
                    InsertVisible="True|False"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Text="string"  
                    ValidationGroup="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:ButtonField>  
                <asp:CheckBoxField  
                    AccessibleHeaderText="string"  
                    DataField="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    InsertVisible="True|False"  
                    ReadOnly="True|False"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Text="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:CheckBoxField>  
                <asp:CommandField  
                    AccessibleHeaderText="string"  
                    ButtonType="Button|Image|Link"  
                    CancelImageUrl="uri"  
                    CancelText="string"  
                    CausesValidation="True|False"  
                    DeleteImageUrl="uri"  
                    DeleteText="string"  
                    EditImageUrl="uri"  
                    EditText="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    InsertImageUrl="uri"  
                    InsertText="string"  
                    InsertVisible="True|False"  
                    NewImageUrl="uri"  
                    NewText="string"  
                    SelectImageUrl="uri"  
                    SelectText="string"  
                    ShowCancelButton="True|False"  
                    ShowDeleteButton="True|False"  
                    ShowEditButton="True|False"  
                    ShowHeader="True|False"  
                    ShowInsertButton="True|False"  
                    ShowSelectButton="True|False"  
                    SortExpression="string"  
                    UpdateImageUrl="uri"  
                    UpdateText="string"  
                    ValidationGroup="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:CommandField>  
                <asp:DynamicField  
                    AccessibleHeaderText="string"  
                    ApplyFormatInEditMode="True|False"  
                    ConvertEmptyStringToNull="True|False"  
                    DataField="string"  
                    DataFormatString="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    HtmlEncode="True|False"  
                    InsertVisible="True|False"  
                    NullDisplayText="string"  
                    ShowHeader="True|False"  
                    UIHint="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:DynamicField>  
                <asp:HyperLinkField  
                    AccessibleHeaderText="string"  
                    DataNavigateUrlFields="string"  
                    DataNavigateUrlFormatString="string"  
                    DataTextField="string"  
                    DataTextFormatString="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    InsertVisible="True|False"  
                    NavigateUrl="uri"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Target="string|_blank|_parent|_search|_self|_top"  
                    Text="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:HyperLinkField>  
                <asp:ImageField  
                    AccessibleHeaderText="string"  
                    AlternateText="string"  
                    ConvertEmptyStringToNull="True|False"  
                    DataAlternateTextField="string"  
                    DataAlternateTextFormatString="string"  
                    DataImageUrlField="string"  
                    DataImageUrlFormatString="string"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    InsertVisible="True|False"  
                    NullDisplayText="string"  
                    NullImageUrl="uri"  
                    ReadOnly="True|False"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Visible="True|False"  
>  
                        <ControlStyle />  
                        <FooterStyle />  
                        <HeaderStyle />  
                        <ItemStyle />  
                </asp:ImageField>  
                <asp:TemplateField  
                    AccessibleHeaderText="string"  
                    ConvertEmptyStringToNull="True|False"  
                    FooterText="string"  
                    HeaderImageUrl="uri"  
                    HeaderText="string"  
                    InsertVisible="True|False"  
                    ShowHeader="True|False"  
                    SortExpression="string"  
                    Visible="True|False"  
>  
                            <ControlStyle />  
                            <FooterStyle />  
                            <HeaderStyle />  
                            <ItemStyle />  
                        <AlternatingItemTemplate>  
                            <!-- child controls -->  
                        </AlternatingItemTemplate>  
                        <EditItemTemplate>  
                            <!-- child controls -->  
                        </EditItemTemplate>  
                        <FooterTemplate>  
                            <!-- child controls -->  
                        </FooterTemplate>  
                        <HeaderTemplate>  
                            <!-- child controls -->  
                        </HeaderTemplate>  
                        <InsertItemTemplate>  
                            <!-- child controls -->  
                        </InsertItemTemplate>  
                        <ItemTemplate>  
                            <!-- child controls -->  
                        </ItemTemplate>  
                </asp:TemplateField>  
        </Fields>  
        <FooterStyle />  
        <FooterTemplate>  
            <!-- child controls -->  
        </FooterTemplate>  
        <HeaderStyle />  
        <HeaderTemplate>  
            <!-- child controls -->  
        </HeaderTemplate>  
        <InsertRowStyle />  
        <PagerSettings  
            FirstPageImageUrl="uri"  
            FirstPageText="string"  
            LastPageImageUrl="uri"  
            LastPageText="string"  
            Mode="NextPrevious|Numeric|NextPreviousFirstLast|  
                NumericFirstLast"  
            NextPageImageUrl="uri"  
            NextPageText="string"  
            OnPropertyChanged="PropertyChanged event handler"  
            PageButtonCount="integer"  
            Position="Bottom|Top|TopAndBottom"  
            PreviousPageImageUrl="uri"  
            PreviousPageText="string"  
            Visible="True|False"  
        />  
        <PagerStyle />  
        <PagerTemplate>  
            <!-- child controls -->  
        </PagerTemplate>  
        <RowStyle        />  
</asp:DetailsView>  

Constructors

DetailsView() DetailsView() DetailsView() DetailsView()

Initializes a new instance of the DetailsView class.

Properties

AccessKey AccessKey AccessKey AccessKey

Gets or sets the access key that allows you to quickly navigate to the Web server control.

(Inherited from WebControl)
Adapter Adapter Adapter Adapter

Gets the browser-specific adapter for the control.

(Inherited from Control)
AllowPaging AllowPaging AllowPaging AllowPaging

Gets or sets a value indicating whether the paging feature is enabled.

AlternatingRowStyle AlternatingRowStyle AlternatingRowStyle AlternatingRowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the alternating data rows in a DetailsView control.

AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory AppRelativeTemplateSourceDirectory

Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.

(Inherited from Control)
Attributes Attributes Attributes Attributes

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.

(Inherited from WebControl)
AutoGenerateDeleteButton AutoGenerateDeleteButton AutoGenerateDeleteButton AutoGenerateDeleteButton

Gets or sets a value indicating whether the built-in control to delete the current record is displayed in a DetailsView control.

AutoGenerateEditButton AutoGenerateEditButton AutoGenerateEditButton AutoGenerateEditButton

Gets or sets a value indicating whether the built-in controls to edit the current record are displayed in a DetailsView control.

AutoGenerateInsertButton AutoGenerateInsertButton AutoGenerateInsertButton AutoGenerateInsertButton

Gets or sets a value indicating whether the built-in controls to insert a new record are displayed in a DetailsView control.

AutoGenerateRows AutoGenerateRows AutoGenerateRows AutoGenerateRows

Gets or sets a value indicating whether row fields for each field in the data source are automatically generated and displayed in a DetailsView control.

BackColor BackColor BackColor BackColor

Gets or sets the background color of the Web server control.

(Inherited from WebControl)
BackImageUrl BackImageUrl BackImageUrl BackImageUrl

Gets or sets the URL to an image to display in the background of a DetailsView control.

BindingContainer BindingContainer BindingContainer BindingContainer

Gets the control that contains this control's data binding.

(Inherited from Control)
BorderColor BorderColor BorderColor BorderColor

Gets or sets the border color of the Web control.

(Inherited from WebControl)
BorderStyle BorderStyle BorderStyle BorderStyle

Gets or sets the border style of the Web server control.

(Inherited from WebControl)
BorderWidth BorderWidth BorderWidth BorderWidth

Gets or sets the border width of the Web server control.

(Inherited from WebControl)
BottomPagerRow BottomPagerRow BottomPagerRow BottomPagerRow

Gets a DetailsViewRow object that represents the bottom pager row in a DetailsView control.

Caption Caption Caption Caption

Gets or sets the text to render in an HTML caption element in a DetailsView control. This property is provided to make the control more accessible to users of assistive technology devices.

CaptionAlign CaptionAlign CaptionAlign CaptionAlign

Gets or sets the horizontal or vertical position of the HTML caption element in a DetailsView control. This property is provided to make the control more accessible to users of assistive technology devices.

CellPadding CellPadding CellPadding CellPadding

Gets or sets the amount of space between the contents of a cell and the cell's border.

CellSpacing CellSpacing CellSpacing CellSpacing

Gets or sets the amount of space between cells.

ChildControlsCreated ChildControlsCreated ChildControlsCreated ChildControlsCreated

Gets a value that indicates whether the server control's child controls have been created.

(Inherited from Control)
ClientID ClientID ClientID ClientID

Gets the control ID for HTML markup that is generated by ASP.NET.

(Inherited from Control)
ClientIDMode ClientIDMode ClientIDMode ClientIDMode

Gets or sets the algorithm that is used to generate the value of the ClientID property.

(Inherited from Control)
ClientIDSeparator ClientIDSeparator ClientIDSeparator ClientIDSeparator

Gets a character value representing the separator character used in the ClientID property.

(Inherited from Control)
CommandRowStyle CommandRowStyle CommandRowStyle CommandRowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of a command row in a DetailsView control.

Context Context Context Context

Gets the HttpContext object associated with the server control for the current Web request.

(Inherited from Control)
Controls Controls Controls Controls

Gets a collection of the child controls within the composite data-bound control.

(Inherited from CompositeDataBoundControl)
ControlStyle ControlStyle ControlStyle ControlStyle

Gets the style of the Web server control. This property is used primarily by control developers.

(Inherited from WebControl)
ControlStyleCreated ControlStyleCreated ControlStyleCreated ControlStyleCreated

Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.

(Inherited from WebControl)
CssClass CssClass CssClass CssClass

Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client.

(Inherited from WebControl)
CurrentMode CurrentMode CurrentMode CurrentMode

Gets the current data-entry mode of the DetailsView control.

DataItem DataItem DataItem DataItem

Gets the data item bound to the DetailsView control.

DataItemContainer DataItemContainer DataItemContainer DataItemContainer

Gets a reference to the naming container if the naming container implements IDataItemContainer.

(Inherited from Control)
DataItemCount DataItemCount DataItemCount DataItemCount

Gets the number of items in the underlying data source.

DataItemIndex DataItemIndex DataItemIndex DataItemIndex

Gets the index of the item being displayed in a DetailsView control from the underlying data source.

DataKey DataKey DataKey DataKey

Gets a DataKey object that represents the primary key of the displayed record.

DataKeyNames DataKeyNames DataKeyNames DataKeyNames

Gets or sets an array that contains the names of the key fields for the data source.

DataKeysContainer DataKeysContainer DataKeysContainer DataKeysContainer

Gets a reference to the naming container if the naming container implements IDataKeysControl.

(Inherited from Control)
DataMember DataMember DataMember DataMember

Gets or sets the name of the list of data that the data-bound control binds to, in cases where the data source contains more than one distinct list of data items.

(Inherited from DataBoundControl)
DataSource DataSource DataSource DataSource

Gets or sets the object from which the data-bound control retrieves its list of data items.

(Inherited from BaseDataBoundControl)
DataSourceID DataSourceID DataSourceID DataSourceID

Gets or sets the ID of the control from which the data-bound control retrieves its list of data items.

(Inherited from DataBoundControl)
DataSourceObject DataSourceObject DataSourceObject DataSourceObject

Gets an object that implements the IDataSource interface, which provides access to the object's data content.

(Inherited from DataBoundControl)
DefaultMode DefaultMode DefaultMode DefaultMode

Get or sets the default data-entry mode of the DetailsView control.

DeleteMethod DeleteMethod DeleteMethod DeleteMethod

Gets or sets the name of the method on the page that is called when the control performs a delete operation.

DesignMode DesignMode DesignMode DesignMode

Gets a value indicating whether a control is being used on a design surface.

(Inherited from Control)
EditRowStyle EditRowStyle EditRowStyle EditRowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the data rows when a DetailsView control is in edit mode.

EmptyDataRowStyle EmptyDataRowStyle EmptyDataRowStyle EmptyDataRowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the empty data row displayed when the data source bound to a DetailsView control does not contain any records.

EmptyDataTemplate EmptyDataTemplate EmptyDataTemplate EmptyDataTemplate

Gets or sets the user-defined content for the empty data row rendered when a DetailsView control is bound to a data source that does not contain any records.

EmptyDataText EmptyDataText EmptyDataText EmptyDataText

Gets or sets the text to display in the empty data row rendered when a DetailsView control is bound to a data source that does not contain any records.

Enabled Enabled Enabled Enabled

Gets or sets a value indicating whether the Web server control is enabled.

(Inherited from WebControl)
EnableModelValidation EnableModelValidation EnableModelValidation EnableModelValidation

Gets or sets a value that indicates whether data-model validation is enabled.

EnablePagingCallbacks EnablePagingCallbacks EnablePagingCallbacks EnablePagingCallbacks

Gets or sets a value indicating whether client-side callback functions are used for paging operations in the DetailsView control.

EnableTheming EnableTheming EnableTheming EnableTheming

Gets or sets a value indicating whether themes apply to this control.

(Inherited from WebControl)
EnableViewState EnableViewState EnableViewState EnableViewState

Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.

(Inherited from Control)
Events Events Events Events

Gets a list of event handler delegates for the control. This property is read-only.

(Inherited from Control)
FieldHeaderStyle FieldHeaderStyle FieldHeaderStyle FieldHeaderStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the header column in a DetailsView control.

Fields Fields Fields Fields

Gets a collection of DataControlField objects that represent the explicitly declared row fields in a DetailsView control.

Font Font Font Font

Gets the font properties associated with the Web server control.

(Inherited from WebControl)
FooterRow FooterRow FooterRow FooterRow

Gets a DetailsViewRow object that represents the footer row in a DetailsView control.

FooterStyle FooterStyle FooterStyle FooterStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the footer row in a DetailsView control.

FooterTemplate FooterTemplate FooterTemplate FooterTemplate

Gets or sets the user-defined content for the footer row in a DetailsView control.

FooterText FooterText FooterText FooterText

Gets or sets the text to display in the footer row of a DetailsView control.

ForeColor ForeColor ForeColor ForeColor

Gets or sets the foreground color (typically the color of the text) of the Web server control.

(Inherited from WebControl)
GridLines GridLines GridLines GridLines

Gets or sets the gridline style for a DetailsView control.

HasAttributes HasAttributes HasAttributes HasAttributes

Gets a value indicating whether the control has attributes set.

(Inherited from WebControl)
HasChildViewState HasChildViewState HasChildViewState HasChildViewState

Gets a value indicating whether the current server control's child controls have any saved view-state settings.

(Inherited from Control)
HeaderRow HeaderRow HeaderRow HeaderRow

Gets a DetailsViewRow object that represents the header row in a DetailsView control.

HeaderStyle HeaderStyle HeaderStyle HeaderStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the header row in a DetailsView control.

HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate

Gets or sets the user-defined content for the header row in a DetailsView control.

HeaderText HeaderText HeaderText HeaderText

Gets or sets the text to display in the header row of a DetailsView control.

Height Height Height Height

Gets or sets the height of the Web server control.

(Inherited from WebControl)
HorizontalAlign HorizontalAlign HorizontalAlign HorizontalAlign

Gets or sets the horizontal alignment of a DetailsView control on the page.

IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder IControlBuilderAccessor.ControlBuilder

For a description of this member, see ControlBuilder.

(Inherited from Control)
IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData IControlDesignerAccessor.UserData

For a description of this member, see UserData.

(Inherited from Control)
ID ID ID ID

Gets or sets the programmatic identifier assigned to the server control.

(Inherited from Control)
IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings IDataBindingsAccessor.DataBindings

For a description of this member, see DataBindings.

(Inherited from Control)
IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings IDataBindingsAccessor.HasDataBindings

For a description of this member, see HasDataBindings.

(Inherited from Control)
IdSeparator IdSeparator IdSeparator IdSeparator

Gets the character used to separate control identifiers.

(Inherited from Control)
IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions IExpressionsAccessor.Expressions

For a description of this member, see Expressions.

(Inherited from Control)
IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions IExpressionsAccessor.HasExpressions

For a description of this member, see HasExpressions.

(Inherited from Control)
Initialized Initialized Initialized Initialized

Gets a value indicating whether the data-bound control has been initialized.

(Inherited from BaseDataBoundControl)
InsertMethod InsertMethod InsertMethod InsertMethod

Gets or sets the name of the method on the page that is called when the control performs an insert operation.

InsertRowStyle InsertRowStyle InsertRowStyle InsertRowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the data rows in a DetailsView control when the DetailsView control is in insert mode.

IsBoundUsingDataSourceID IsBoundUsingDataSourceID IsBoundUsingDataSourceID IsBoundUsingDataSourceID

Gets a value indicating whether the DataSourceID property is set.

(Inherited from BaseDataBoundControl)
IsChildControlStateCleared IsChildControlStateCleared IsChildControlStateCleared IsChildControlStateCleared

Gets a value indicating whether controls contained within this control have control state.

(Inherited from Control)
IsDataBindingAutomatic IsDataBindingAutomatic IsDataBindingAutomatic IsDataBindingAutomatic

Gets a value that indicates whether data binding is automatic.

(Inherited from BaseDataBoundControl)
IsEnabled IsEnabled IsEnabled IsEnabled

Gets a value indicating whether the control is enabled.

(Inherited from WebControl)
IsTrackingViewState IsTrackingViewState IsTrackingViewState IsTrackingViewState

Gets a value that indicates whether the server control is saving changes to its view state.

(Inherited from Control)
IsUsingModelBinders IsUsingModelBinders IsUsingModelBinders IsUsingModelBinders

Gets a value that indicates whether model binding is in use.

(Inherited from CompositeDataBoundControl)
IsViewStateEnabled IsViewStateEnabled IsViewStateEnabled IsViewStateEnabled

Gets a value indicating whether view state is enabled for this control.

(Inherited from Control)
ItemType ItemType ItemType ItemType

Gets or sets the name of the data item type for strongly typed data binding.

(Inherited from DataBoundControl)
LoadViewStateByID LoadViewStateByID LoadViewStateByID LoadViewStateByID

Gets a value indicating whether the control participates in loading its view state by ID instead of index.

(Inherited from Control)
NamingContainer NamingContainer NamingContainer NamingContainer

Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value.

(Inherited from Control)
Page Page Page Page

Gets a reference to the Page instance that contains the server control.

(Inherited from Control)
PageCount PageCount PageCount PageCount

Gets the number of records in the data source.

PageIndex PageIndex PageIndex PageIndex

Gets or sets the index of the displayed record.

PagerSettings PagerSettings PagerSettings PagerSettings

Gets a reference to the PagerSettings object that allows you to set the properties of the pager buttons in a DetailsView control.

PagerStyle PagerStyle PagerStyle PagerStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the pager row in a DetailsView control.

PagerTemplate PagerTemplate PagerTemplate PagerTemplate

Gets or sets the custom content for the pager row in a DetailsView control.

Parent Parent Parent Parent

Gets a reference to the server control's parent control in the page control hierarchy.

(Inherited from Control)
RenderingCompatibility RenderingCompatibility RenderingCompatibility RenderingCompatibility

Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with.

(Inherited from Control)
RequiresDataBinding RequiresDataBinding RequiresDataBinding RequiresDataBinding

Gets or sets a value indicating whether the DataBind() method should be called.

(Inherited from BaseDataBoundControl)
Rows Rows Rows Rows

Gets a collection of DetailsViewRow objects that represent the data rows in a DetailsView control.

RowsGenerator RowsGenerator RowsGenerator RowsGenerator

Gets or sets an object that implements the IAutoFieldGenerator interface in order to automatically populate rows in the view.

RowStyle RowStyle RowStyle RowStyle

Gets a reference to the TableItemStyle object that allows you to set the appearance of the data rows in a DetailsView control.

SelectArguments SelectArguments SelectArguments SelectArguments

Gets a DataSourceSelectArguments object that the data-bound control uses when retrieving data from a data source control.

(Inherited from DataBoundControl)
SelectedValue SelectedValue SelectedValue SelectedValue

Gets the data key value of the current record in a DetailsView control.

SelectMethod SelectMethod SelectMethod SelectMethod

The name of the method to call in order to read data.

(Inherited from DataBoundControl)
Site Site Site Site

Gets information about the container that hosts the current control when rendered on a design surface.

(Inherited from Control)
SkinID SkinID SkinID SkinID

Gets or sets the skin to apply to the control.

(Inherited from WebControl)
Style Style Style Style

Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.

(Inherited from WebControl)
SupportsDisabledAttribute SupportsDisabledAttribute SupportsDisabledAttribute SupportsDisabledAttribute

Gets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is false.

(Inherited from BaseDataBoundControl)
TabIndex TabIndex TabIndex TabIndex

Gets or sets the tab index of the Web server control.

(Inherited from WebControl)
TagKey TagKey TagKey TagKey

Gets the HtmlTextWriterTag value for the DetailsView control.

TagName TagName TagName TagName

Gets the name of the control tag. This property is used primarily by control developers.

(Inherited from WebControl)
TemplateControl TemplateControl TemplateControl TemplateControl

Gets or sets a reference to the template that contains this control.

(Inherited from Control)
TemplateSourceDirectory TemplateSourceDirectory TemplateSourceDirectory TemplateSourceDirectory

Gets the virtual directory of the Page or UserControl that contains the current server control.

(Inherited from Control)
ToolTip ToolTip ToolTip ToolTip

Gets or sets the text displayed when the mouse pointer hovers over the Web server control.

(Inherited from WebControl)
TopPagerRow TopPagerRow TopPagerRow TopPagerRow

Gets a DetailsViewRow object that represents the top pager row in a DetailsView control.

UniqueID UniqueID UniqueID UniqueID

Gets the unique, hierarchically qualified identifier for the server control.

(Inherited from Control)
UpdateMethod UpdateMethod UpdateMethod UpdateMethod

Gets or sets the name of the method on the page that is called when the control performs an update operation.

ValidateRequestMode ValidateRequestMode ValidateRequestMode ValidateRequestMode

Gets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values.

(Inherited from Control)
ViewState ViewState ViewState ViewState

Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.

(Inherited from Control)
ViewStateIgnoresCase ViewStateIgnoresCase ViewStateIgnoresCase ViewStateIgnoresCase

Gets a value that indicates whether the StateBag object is case-insensitive.

(Inherited from Control)
ViewStateMode ViewStateMode ViewStateMode ViewStateMode

Gets or sets the view-state mode of this control.

(Inherited from Control)
Visible Visible Visible Visible

Gets or sets a value that indicates whether a server control is rendered as UI on the page.

(Inherited from Control)
Width Width Width Width

Gets or sets the width of the Web server control.

(Inherited from WebControl)

Methods

AddAttributesToRender(HtmlTextWriter) AddAttributesToRender(HtmlTextWriter) AddAttributesToRender(HtmlTextWriter) AddAttributesToRender(HtmlTextWriter)

Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers.

(Inherited from WebControl)
AddedControl(Control, Int32) AddedControl(Control, Int32) AddedControl(Control, Int32) AddedControl(Control, Int32)

Called after a child control is added to the Controls collection of the Control object.

(Inherited from Control)
AddParsedSubObject(Object) AddParsedSubObject(Object) AddParsedSubObject(Object) AddParsedSubObject(Object)

Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object.

(Inherited from Control)
ApplyStyle(Style) ApplyStyle(Style) ApplyStyle(Style) ApplyStyle(Style)

Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.

(Inherited from WebControl)
ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page) ApplyStyleSheetSkin(Page)

Applies the style properties defined in the page style sheet to the control.

(Inherited from Control)
BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object) BeginRenderTracing(TextWriter, Object)

Begins design-time tracing of rendering data.

(Inherited from Control)
BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean) BuildProfileTree(String, Boolean)

Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page.

(Inherited from Control)
ChangeMode(DetailsViewMode) ChangeMode(DetailsViewMode) ChangeMode(DetailsViewMode) ChangeMode(DetailsViewMode)

Switches the DetailsView control to the specified mode.

ClearCachedClientID() ClearCachedClientID() ClearCachedClientID() ClearCachedClientID()

Sets the cached ClientID value to null.

(Inherited from Control)
ClearChildControlState() ClearChildControlState() ClearChildControlState() ClearChildControlState()

Deletes the control-state information for the server control's child controls.

(Inherited from Control)
ClearChildState() ClearChildState() ClearChildState() ClearChildState()

Deletes the view-state and control-state information for all the server control's child controls.

(Inherited from Control)
ClearChildViewState() ClearChildViewState() ClearChildViewState() ClearChildViewState()

Deletes the view-state information for all the server control's child controls.

(Inherited from Control)
ClearEffectiveClientIDMode() ClearEffectiveClientIDMode() ClearEffectiveClientIDMode() ClearEffectiveClientIDMode()

Sets the ClientIDMode property of the current control instance and of any child controls to Inherit.

(Inherited from Control)
ConfirmInitState() ConfirmInitState() ConfirmInitState() ConfirmInitState()

Sets the initialized state of the data-bound control.

(Inherited from BaseDataBoundControl)
CopyBaseAttributes(WebControl) CopyBaseAttributes(WebControl) CopyBaseAttributes(WebControl) CopyBaseAttributes(WebControl)

Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.

(Inherited from WebControl)
CreateAutoGeneratedRow(AutoGeneratedFieldProperties) CreateAutoGeneratedRow(AutoGeneratedFieldProperties) CreateAutoGeneratedRow(AutoGeneratedFieldProperties) CreateAutoGeneratedRow(AutoGeneratedFieldProperties)

Creates an AutoGeneratedField object that represents an automatically generated row field using the specified field properties.

CreateAutoGeneratedRows(Object) CreateAutoGeneratedRows(Object) CreateAutoGeneratedRows(Object) CreateAutoGeneratedRows(Object)

Creates a set of automatically generated row fields for the specified data item.

CreateChildControls() CreateChildControls() CreateChildControls() CreateChildControls()

Creates the control hierarchy that is used to render a composite data-bound control based on the values that are stored in view state.

(Inherited from CompositeDataBoundControl)
CreateChildControls(IEnumerable, Boolean) CreateChildControls(IEnumerable, Boolean) CreateChildControls(IEnumerable, Boolean) CreateChildControls(IEnumerable, Boolean)

Creates the control hierarchy used to render the DetailsView control.

CreateControlCollection() CreateControlCollection() CreateControlCollection() CreateControlCollection()

Creates a new ControlCollection object to hold the child controls (both literal and server) of the server control.

(Inherited from Control)
CreateControlStyle() CreateControlStyle() CreateControlStyle() CreateControlStyle()

Creates a default table style object for the DetailsView control.

CreateDataSourceSelectArguments() CreateDataSourceSelectArguments() CreateDataSourceSelectArguments() CreateDataSourceSelectArguments()

Creates the DataSourceSelectArguments object that gets passed to the Select command.

CreateFieldSet(Object, Boolean) CreateFieldSet(Object, Boolean) CreateFieldSet(Object, Boolean) CreateFieldSet(Object, Boolean)

Creates the complete set of automatically generated and user-defined row fields used to generate the control hierarchy.

CreateRow(Int32, DataControlRowType, DataControlRowState) CreateRow(Int32, DataControlRowType, DataControlRowState) CreateRow(Int32, DataControlRowType, DataControlRowState) CreateRow(Int32, DataControlRowType, DataControlRowState)

Creates a DetailsViewRow object using the specified item index, row type, and row state.

CreateTable() CreateTable() CreateTable() CreateTable()

Creates the containing table for the DetailsView control.

DataBind() DataBind() DataBind() DataBind()

Calls the DataBind() method of the base class.

DataBind(Boolean) DataBind(Boolean) DataBind(Boolean) DataBind(Boolean)

Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event.

(Inherited from Control)
DataBindChildren() DataBindChildren() DataBindChildren() DataBindChildren()

Binds a data source to the server control's child controls.

(Inherited from Control)
DeleteItem() DeleteItem() DeleteItem() DeleteItem()

Deletes the current record from the data source.

Dispose() Dispose() Dispose() Dispose()

Enables a server control to perform final clean up before it is released from memory.

(Inherited from Control)
EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object) EndRenderTracing(TextWriter, Object)

Ends design-time tracing of rendering data.

(Inherited from Control)
EnsureChildControls() EnsureChildControls() EnsureChildControls() EnsureChildControls()

Determines whether the server control contains child controls. If it does not, it creates child controls.

(Inherited from Control)
EnsureDataBound() EnsureDataBound() EnsureDataBound() EnsureDataBound()

Calls the DataBind() method after verifying that the data listing control requires data binding and that a valid data source control is specified.

EnsureID() EnsureID() EnsureID() EnsureID()

Creates an identifier for controls that do not have an identifier assigned.

(Inherited from Control)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExtractRowValues(IOrderedDictionary, Boolean, Boolean) ExtractRowValues(IOrderedDictionary, Boolean, Boolean) ExtractRowValues(IOrderedDictionary, Boolean, Boolean) ExtractRowValues(IOrderedDictionary, Boolean, Boolean)

Retrieves the values of each field displayed and stores them in the specified IOrderedDictionary object.

FindControl(String) FindControl(String) FindControl(String) FindControl(String)

Searches the current naming container for a server control with the specified id parameter.

(Inherited from Control)
FindControl(String, Int32) FindControl(String, Int32) FindControl(String, Int32) FindControl(String, Int32)

Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method.

(Inherited from Control)
Focus() Focus() Focus() Focus()

Sets input focus to a control.

(Inherited from Control)
GetCallbackResult() GetCallbackResult() GetCallbackResult() GetCallbackResult()

Returns the result of a callback event that targets a control.

GetCallbackScript(IButtonControl, String) GetCallbackScript(IButtonControl, String) GetCallbackScript(IButtonControl, String) GetCallbackScript(IButtonControl, String)

Returns the callback string created using the specified argument.

GetData() GetData() GetData() GetData()

Retrieves a DataSourceView object that the data-bound control uses to perform data operations.

(Inherited from DataBoundControl)
GetDataSource() GetDataSource() GetDataSource() GetDataSource()

Retrieves the IDataSource interface that the data-bound control is associated with, if any.

(Inherited from DataBoundControl)
GetDesignModeState() GetDesignModeState() GetDesignModeState() GetDesignModeState()

Gets design-time data for a control.

(Inherited from Control)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetRouteUrl(Object) GetRouteUrl(Object) GetRouteUrl(Object) GetRouteUrl(Object)

Gets the URL that corresponds to a set of route parameters.

(Inherited from Control)
GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary) GetRouteUrl(RouteValueDictionary)

Gets the URL that corresponds to a set of route parameters.

(Inherited from Control)
GetRouteUrl(String, Object) GetRouteUrl(String, Object) GetRouteUrl(String, Object) GetRouteUrl(String, Object)

Gets the URL that corresponds to a set of route parameters and a route name.

(Inherited from Control)
GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary) GetRouteUrl(String, RouteValueDictionary)

Gets the URL that corresponds to a set of route parameters and a route name.

(Inherited from Control)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control) GetUniqueIDRelativeTo(Control)

Returns the prefixed portion of the UniqueID property of the specified control.

(Inherited from Control)
HasControls() HasControls() HasControls() HasControls()

Determines if the server control contains any child controls.

(Inherited from Control)
HasEvents() HasEvents() HasEvents() HasEvents()

Returns a value indicating whether events are registered for the control or any child controls.

(Inherited from Control)
InitializePager(DetailsViewRow, PagedDataSource) InitializePager(DetailsViewRow, PagedDataSource) InitializePager(DetailsViewRow, PagedDataSource) InitializePager(DetailsViewRow, PagedDataSource)

Creates the pager row for the DetailsView control.

InitializeRow(DetailsViewRow, DataControlField) InitializeRow(DetailsViewRow, DataControlField) InitializeRow(DetailsViewRow, DataControlField) InitializeRow(DetailsViewRow, DataControlField)

Initializes the specified DetailsViewRow object.

InsertItem(Boolean) InsertItem(Boolean) InsertItem(Boolean) InsertItem(Boolean)

Inserts the current record in the data source.

IsBindableType(Type) IsBindableType(Type) IsBindableType(Type) IsBindableType(Type)

Determines whether the specified data type can be bound to a field in the DetailsView control.

IsLiteralContent() IsLiteralContent() IsLiteralContent() IsLiteralContent()

Determines if the server control holds only literal content.

(Inherited from Control)
LoadControlState(Object) LoadControlState(Object) LoadControlState(Object) LoadControlState(Object)

Loads the state of the properties in the DetailsView control that need to be persisted, even when the EnableViewState property is set to false.

LoadViewState(Object) LoadViewState(Object) LoadViewState(Object) LoadViewState(Object)

Loads the previously saved view state of the DetailsView control.

MapPathSecure(String) MapPathSecure(String) MapPathSecure(String) MapPathSecure(String)

Retrieves the physical path that a virtual path, either absolute or relative, maps to.

(Inherited from Control)
MarkAsDataBound() MarkAsDataBound() MarkAsDataBound() MarkAsDataBound()

Sets the state of the control in view state as successfully bound to data.

(Inherited from DataBoundControl)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MergeStyle(Style) MergeStyle(Style) MergeStyle(Style) MergeStyle(Style)

Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.

(Inherited from WebControl)
OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs) OnBubbleEvent(Object, EventArgs)

Determines whether the event for the Web server control is passed up the page's user interface (UI) server control hierarchy.

OnCreatingModelDataSource(CreatingModelDataSourceEventArgs) OnCreatingModelDataSource(CreatingModelDataSourceEventArgs) OnCreatingModelDataSource(CreatingModelDataSourceEventArgs) OnCreatingModelDataSource(CreatingModelDataSourceEventArgs)

Raises the CreatingModelDataSource event.

(Inherited from DataBoundControl)
OnDataBinding(EventArgs) OnDataBinding(EventArgs) OnDataBinding(EventArgs) OnDataBinding(EventArgs)

Raises the DataBinding event.

(Inherited from Control)
OnDataBound(EventArgs) OnDataBound(EventArgs) OnDataBound(EventArgs) OnDataBound(EventArgs)

Raises the DataBound event.

(Inherited from BaseDataBoundControl)
OnDataPropertyChanged() OnDataPropertyChanged() OnDataPropertyChanged() OnDataPropertyChanged()

Rebinds the data-bound control to its data after one of the base data source identification properties changes.

(Inherited from DataBoundControl)
OnDataSourceViewChanged(Object, EventArgs) OnDataSourceViewChanged(Object, EventArgs) OnDataSourceViewChanged(Object, EventArgs) OnDataSourceViewChanged(Object, EventArgs)

Raises the DataSourceViewChanged event.

OnInit(EventArgs) OnInit(EventArgs) OnInit(EventArgs) OnInit(EventArgs)

Raises the Init event.

OnItemCommand(DetailsViewCommandEventArgs) OnItemCommand(DetailsViewCommandEventArgs) OnItemCommand(DetailsViewCommandEventArgs) OnItemCommand(DetailsViewCommandEventArgs)

Raises the ItemCommand event.

OnItemCreated(EventArgs) OnItemCreated(EventArgs) OnItemCreated(EventArgs) OnItemCreated(EventArgs)

Raises the ItemCreated event.

OnItemDeleted(DetailsViewDeletedEventArgs) OnItemDeleted(DetailsViewDeletedEventArgs) OnItemDeleted(DetailsViewDeletedEventArgs) OnItemDeleted(DetailsViewDeletedEventArgs)

Raises the ItemDeleted event.

OnItemDeleting(DetailsViewDeleteEventArgs) OnItemDeleting(DetailsViewDeleteEventArgs) OnItemDeleting(DetailsViewDeleteEventArgs) OnItemDeleting(DetailsViewDeleteEventArgs)

Raises the ItemDeleting event.

OnItemInserted(DetailsViewInsertedEventArgs) OnItemInserted(DetailsViewInsertedEventArgs) OnItemInserted(DetailsViewInsertedEventArgs) OnItemInserted(DetailsViewInsertedEventArgs)

Raises the ItemInserted event.

OnItemInserting(DetailsViewInsertEventArgs) OnItemInserting(DetailsViewInsertEventArgs) OnItemInserting(DetailsViewInsertEventArgs) OnItemInserting(DetailsViewInsertEventArgs)

Raises the ItemInserting event.

OnItemUpdated(DetailsViewUpdatedEventArgs) OnItemUpdated(DetailsViewUpdatedEventArgs) OnItemUpdated(DetailsViewUpdatedEventArgs) OnItemUpdated(DetailsViewUpdatedEventArgs)

Raises the ItemUpdated event.

OnItemUpdating(DetailsViewUpdateEventArgs) OnItemUpdating(DetailsViewUpdateEventArgs) OnItemUpdating(DetailsViewUpdateEventArgs) OnItemUpdating(DetailsViewUpdateEventArgs)

Raises the ItemUpdating event.

OnLoad(EventArgs) OnLoad(EventArgs) OnLoad(EventArgs) OnLoad(EventArgs)

Handles the Load event.

(Inherited from DataBoundControl)
OnModeChanged(EventArgs) OnModeChanged(EventArgs) OnModeChanged(EventArgs) OnModeChanged(EventArgs)

Raises the ModeChanged event.

OnModeChanging(DetailsViewModeEventArgs) OnModeChanging(DetailsViewModeEventArgs) OnModeChanging(DetailsViewModeEventArgs) OnModeChanging(DetailsViewModeEventArgs)

Raises the ModeChanging event.

OnPageIndexChanged(EventArgs) OnPageIndexChanged(EventArgs) OnPageIndexChanged(EventArgs) OnPageIndexChanged(EventArgs)

Raises the PageIndexChanged event.

OnPageIndexChanging(DetailsViewPageEventArgs) OnPageIndexChanging(DetailsViewPageEventArgs) OnPageIndexChanging(DetailsViewPageEventArgs) OnPageIndexChanging(DetailsViewPageEventArgs)

Raises the PageIndexChanging event.

OnPagePreLoad(Object, EventArgs) OnPagePreLoad(Object, EventArgs) OnPagePreLoad(Object, EventArgs) OnPagePreLoad(Object, EventArgs)

Sets the initialized state of the data-bound control before the control is loaded.

OnPreRender(EventArgs) OnPreRender(EventArgs) OnPreRender(EventArgs) OnPreRender(EventArgs)

Raises the PreRender event.

OnUnload(EventArgs) OnUnload(EventArgs) OnUnload(EventArgs) OnUnload(EventArgs)

Raises the Unload event.

(Inherited from Control)
OpenFile(String) OpenFile(String) OpenFile(String) OpenFile(String)

Gets a Stream used to read a file.

(Inherited from Control)
PerformDataBinding(IEnumerable) PerformDataBinding(IEnumerable) PerformDataBinding(IEnumerable) PerformDataBinding(IEnumerable)

Binds the specified data source to the DetailsView control.

PerformSelect() PerformSelect() PerformSelect() PerformSelect()

Retrieves data from the associated data source.

(Inherited from DataBoundControl)
PrepareControlHierarchy() PrepareControlHierarchy() PrepareControlHierarchy() PrepareControlHierarchy()

Sets up the control hierarchy of the DetailsView control.

RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs) RaiseBubbleEvent(Object, EventArgs)

Assigns any sources of the event and its information to the control's parent.

(Inherited from Control)
RaiseCallbackEvent(String) RaiseCallbackEvent(String) RaiseCallbackEvent(String) RaiseCallbackEvent(String)

Creates the arguments for the callback handler in the GetCallbackEventReference method.

RaisePostBackEvent(String) RaisePostBackEvent(String) RaisePostBackEvent(String) RaisePostBackEvent(String)

Raises the appropriate events for the DetailsView control when it posts back to the server.

RemovedControl(Control) RemovedControl(Control) RemovedControl(Control) RemovedControl(Control)

Called after a child control is removed from the Controls collection of the Control object.

(Inherited from Control)
Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter) Render(HtmlTextWriter)

Displays the DetailsView control on the client using the specified HtmlTextWriter object.

RenderBeginTag(HtmlTextWriter) RenderBeginTag(HtmlTextWriter) RenderBeginTag(HtmlTextWriter) RenderBeginTag(HtmlTextWriter)

Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers.

(Inherited from WebControl)
RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter) RenderChildren(HtmlTextWriter)

Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.

(Inherited from Control)
RenderContents(HtmlTextWriter) RenderContents(HtmlTextWriter) RenderContents(HtmlTextWriter) RenderContents(HtmlTextWriter)

Renders the contents of the control to the specified writer. This method is used primarily by control developers.

(Inherited from WebControl)
RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter) RenderControl(HtmlTextWriter)

Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

(Inherited from Control)
RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter) RenderControl(HtmlTextWriter, ControlAdapter)

Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.

(Inherited from Control)
RenderEndTag(HtmlTextWriter) RenderEndTag(HtmlTextWriter) RenderEndTag(HtmlTextWriter) RenderEndTag(HtmlTextWriter)

Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.

(Inherited from WebControl)
ResolveAdapter() ResolveAdapter() ResolveAdapter() ResolveAdapter()

Gets the control adapter responsible for rendering the specified control.

(Inherited from Control)
ResolveClientUrl(String) ResolveClientUrl(String) ResolveClientUrl(String) ResolveClientUrl(String)

Gets a URL that can be used by the browser.

(Inherited from Control)
ResolveUrl(String) ResolveUrl(String) ResolveUrl(String) ResolveUrl(String)

Converts a URL into one that is usable on the requesting client.

(Inherited from Control)
SaveControlState() SaveControlState() SaveControlState() SaveControlState()

Saves the state of the properties in the DetailsView control that need to be persisted, even when the EnableViewState property is set to false.

SaveViewState() SaveViewState() SaveViewState() SaveViewState()

Saves the current view state of the DetailsView control.

SetDesignModeState(IDictionary) SetDesignModeState(IDictionary) SetDesignModeState(IDictionary) SetDesignModeState(IDictionary)

Sets design-time data for a control.

(Inherited from Control)
SetPageIndex(Int32) SetPageIndex(Int32) SetPageIndex(Int32) SetPageIndex(Int32)

Sets the index of the currently displayed page in the DetailsView control.

SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod) SetRenderMethodDelegate(RenderMethod)

Assigns an event handler delegate to render the server control and its content into its parent control.

(Inherited from Control)
SetTraceData(Object, Object) SetTraceData(Object, Object) SetTraceData(Object, Object) SetTraceData(Object, Object)

Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value.

(Inherited from Control)
SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object) SetTraceData(Object, Object, Object)

Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value.

(Inherited from Control)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TrackViewState() TrackViewState() TrackViewState() TrackViewState()

Marks the starting point to begin tracking and saving view-state changes to the DetailsView control.

UpdateItem(Boolean) UpdateItem(Boolean) UpdateItem(Boolean) UpdateItem(Boolean)

Updates the current record in the data source.

ValidateDataSource(Object) ValidateDataSource(Object) ValidateDataSource(Object) ValidateDataSource(Object)

Verifies that the object a data-bound control binds to is one it can work with.

(Inherited from DataBoundControl)

Events

CallingDataMethods CallingDataMethods CallingDataMethods CallingDataMethods

Occurs when data methods are being called.

(Inherited from DataBoundControl)
CreatingModelDataSource CreatingModelDataSource CreatingModelDataSource CreatingModelDataSource

Occurs when the ModelDataSource object is being created.

(Inherited from DataBoundControl)
DataBinding DataBinding DataBinding DataBinding

Occurs when the server control binds to a data source.

(Inherited from Control)
DataBound DataBound DataBound DataBound

Occurs after the server control binds to a data source.

(Inherited from BaseDataBoundControl)
Disposed Disposed Disposed Disposed

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.

(Inherited from Control)
Init Init Init Init

Occurs when the server control is initialized, which is the first step in its lifecycle.

(Inherited from Control)
ItemCommand ItemCommand ItemCommand ItemCommand

Occurs when a button within a DetailsView control is clicked.

ItemCreated ItemCreated ItemCreated ItemCreated

Occurs when a record is created in a DetailsView control.

ItemDeleted ItemDeleted ItemDeleted ItemDeleted

Occurs when a Delete button within a DetailsView control is clicked, but after the delete operation.

ItemDeleting ItemDeleting ItemDeleting ItemDeleting

Occurs when a Delete button within a DetailsView control is clicked, but before the delete operation.

ItemInserted ItemInserted ItemInserted ItemInserted

Occurs when an Insert button within a DetailsView control is clicked, but after the insert operation.

ItemInserting ItemInserting ItemInserting ItemInserting

Occurs when an Insert button within a DetailsView control is clicked, but before the insert operation.

ItemUpdated ItemUpdated ItemUpdated ItemUpdated

Occurs when an Update button within a DetailsView control is clicked, but after the update operation.

ItemUpdating ItemUpdating ItemUpdating ItemUpdating

Occurs when an Update button within a DetailsView control is clicked, but before the update operation.

Load Load Load Load

Occurs when the server control is loaded into the Page object.

(Inherited from Control)
ModeChanged ModeChanged ModeChanged ModeChanged

Occurs when a DetailsView control attempts to change between edit, insert, and read-only mode, but after the CurrentMode property is updated.

ModeChanging ModeChanging ModeChanging ModeChanging

Occurs when a DetailsView control attempts to change between edit, insert, and read-only mode, but before the CurrentMode property is updated.

PageIndexChanged PageIndexChanged PageIndexChanged PageIndexChanged

Occurs when the value of the PageIndex property changes after a paging operation.

PageIndexChanging PageIndexChanging PageIndexChanging PageIndexChanging

Occurs when the value of the PageIndex property changes before a paging operation.

PreRender PreRender PreRender PreRender

Occurs after the Control object is loaded but prior to rendering.

(Inherited from Control)
Unload Unload Unload Unload

Occurs when the server control is unloaded from memory.

(Inherited from Control)

Explicit Interface Implementations

IAttributeAccessor.GetAttribute(String) IAttributeAccessor.GetAttribute(String) IAttributeAccessor.GetAttribute(String) IAttributeAccessor.GetAttribute(String)

Gets an attribute of the Web control with the specified name.

(Inherited from WebControl)
IAttributeAccessor.SetAttribute(String, String) IAttributeAccessor.SetAttribute(String, String) IAttributeAccessor.SetAttribute(String, String) IAttributeAccessor.SetAttribute(String, String)

Sets an attribute of the Web control to the specified name and value.

(Inherited from WebControl)
ICallbackContainer.GetCallbackScript(IButtonControl, String) ICallbackContainer.GetCallbackScript(IButtonControl, String) ICallbackContainer.GetCallbackScript(IButtonControl, String) ICallbackContainer.GetCallbackScript(IButtonControl, String)

Creates the callback script for the DetailsView control.

ICallbackEventHandler.GetCallbackResult() ICallbackEventHandler.GetCallbackResult() ICallbackEventHandler.GetCallbackResult() ICallbackEventHandler.GetCallbackResult()

See the method GetCallbackResult().

ICallbackEventHandler.RaiseCallbackEvent(String) ICallbackEventHandler.RaiseCallbackEvent(String) ICallbackEventHandler.RaiseCallbackEvent(String) ICallbackEventHandler.RaiseCallbackEvent(String)

Raises the callback event using the specified arguments.

IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState() IControlDesignerAccessor.GetDesignModeState()

For a description of this member, see GetDesignModeState().

(Inherited from Control)
IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary) IControlDesignerAccessor.SetDesignModeState(IDictionary)

For a description of this member, see SetDesignModeState(IDictionary).

(Inherited from Control)
IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control) IControlDesignerAccessor.SetOwnerControl(Control)

For a description of this member, see SetOwnerControl(Control).

(Inherited from Control)
IDataBoundControl.DataKeyNames IDataBoundControl.DataKeyNames IDataBoundControl.DataKeyNames IDataBoundControl.DataKeyNames

For a description of this property, see DataKeyNames.

IDataBoundControl.DataMember IDataBoundControl.DataMember IDataBoundControl.DataMember IDataBoundControl.DataMember

For a description of this property, see DataMember.

IDataBoundControl.DataSource IDataBoundControl.DataSource IDataBoundControl.DataSource IDataBoundControl.DataSource

For a description of this property, see DataSource.

IDataBoundControl.DataSourceID IDataBoundControl.DataSourceID IDataBoundControl.DataSourceID IDataBoundControl.DataSourceID

For a description of this property, see DataSourceID.

IDataBoundControl.DataSourceObject IDataBoundControl.DataSourceObject IDataBoundControl.DataSourceObject IDataBoundControl.DataSourceObject

For a description of this property, see DataSourceObject.

IDataBoundItemControl.DataKey IDataBoundItemControl.DataKey IDataBoundItemControl.DataKey IDataBoundItemControl.DataKey

For a description of this property, see DataKey.

IDataBoundItemControl.Mode IDataBoundItemControl.Mode IDataBoundItemControl.Mode IDataBoundItemControl.Mode

For a description of this property, see Mode.

IDataItemContainer.DataItemIndex IDataItemContainer.DataItemIndex IDataItemContainer.DataItemIndex IDataItemContainer.DataItemIndex

For a description of this member, see DataItemIndex.

IDataItemContainer.DisplayIndex IDataItemContainer.DisplayIndex IDataItemContainer.DisplayIndex IDataItemContainer.DisplayIndex

For a description of this member, see DisplayIndex.

IFieldControl.FieldsGenerator IFieldControl.FieldsGenerator IFieldControl.FieldsGenerator IFieldControl.FieldsGenerator

For a description of this property, see FieldsGenerator.

IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object) IParserAccessor.AddParsedSubObject(Object)

For a description of this member, see AddParsedSubObject(Object).

(Inherited from Control)
IPostBackContainer.GetPostBackOptions(IButtonControl) IPostBackContainer.GetPostBackOptions(IButtonControl) IPostBackContainer.GetPostBackOptions(IButtonControl) IPostBackContainer.GetPostBackOptions(IButtonControl)

For a description of this member, see GetPostBackOptions(IButtonControl).

IPostBackEventHandler.RaisePostBackEvent(String) IPostBackEventHandler.RaisePostBackEvent(String) IPostBackEventHandler.RaisePostBackEvent(String) IPostBackEventHandler.RaisePostBackEvent(String)

For a description of this member, see RaisePostBackEvent(String).

Extension Methods

EnablePersistedSelection(BaseDataBoundControl) EnablePersistedSelection(BaseDataBoundControl) EnablePersistedSelection(BaseDataBoundControl) EnablePersistedSelection(BaseDataBoundControl)

Enables selection to be persisted in data controls that support selection and paging.

FindDataSourceControl(Control) FindDataSourceControl(Control) FindDataSourceControl(Control) FindDataSourceControl(Control)

Returns the data source that is associated with the data control for the specified control.

FindFieldTemplate(Control, String) FindFieldTemplate(Control, String) FindFieldTemplate(Control, String) FindFieldTemplate(Control, String)

Returns the field template for the specified column in the specified control's naming container.

FindMetaTable(Control) FindMetaTable(Control) FindMetaTable(Control) FindMetaTable(Control)

Returns the metatable object for the containing data control.

GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer) GetDefaultValues(INamingContainer)

Gets the collection of the default values for the specified data control.

GetMetaTable(INamingContainer) GetMetaTable(INamingContainer) GetMetaTable(INamingContainer) GetMetaTable(INamingContainer)

Gets the table metadata for the specified data control.

SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable) SetMetaTable(INamingContainer, MetaTable)

Sets the table metadata for the specified data control.

SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>) SetMetaTable(INamingContainer, MetaTable, IDictionary<String,Object>)

Sets the table metadata and default value mapping for the specified data control.

SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object) SetMetaTable(INamingContainer, MetaTable, Object)

Sets the table metadata and default value mapping for the specified data control.

TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable) TryGetMetaTable(INamingContainer, MetaTable)

Determines whether table metadata is available.

EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type) EnableDynamicData(INamingContainer, Type)

Enables Dynamic Data behavior for the specified data control.

EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>) EnableDynamicData(INamingContainer, Type, IDictionary<String,Object>)

Enables Dynamic Data behavior for the specified data control.

EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object) EnableDynamicData(INamingContainer, Type, Object)

Enables Dynamic Data behavior for the specified data control.

Applies to

See Also