TechTalk Genome v4.2

DetailsViewCommandBar Class

Represents a command bar attached to a DetailsView control.

For a list of all members of this type, see DetailsViewCommandBar Members.

System.Object
   Control
      DetailsViewCommandBar

[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="System.Web.UI.Design.ControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[DesignerSerializer(SerializerTypeName="Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", SerializerBaseTypeName="System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[ToolboxItem(ToolboxItemType="System.Web.UI.Design.WebControlToolboxItem", ToolboxItemTypeName="System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[Bindable(Bindable="True", Direction="OneWay")]
[DefaultProperty(Name="ID")]
[DesignerCategory(Category="Code")]
[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="System.Web.UI.Design.ControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[ToolboxItemFilter(FilterString="System.Web.UI", FilterType="Require")]
[Themeable(Themeable="False")]
public class DetailsViewCommandBar : Control, INamingContainer

Remarks

The DetailsViewCommandBar renders command buttons for selecting, editing, inserting, or deleting operations in the associated DetailsView control. While the ASP.NET CommandField provides the same functionality, it can render its content within the boundaries of the DetailsView control only. The DetailsViewCommandBar is a standalone control that can be placed anywhere on the page. The ID of the associated DetailsView control must be set with the DetailsViewID property.

Example

          
  <genomeControls:DetailsViewCommandBar ID="EmployeeDetailsViewCommandBar" runat="server" 
      DetailsViewID="EmployeeDetailsView" 
      ShowDeleteButton="True" 
      ShowEditButton="True" 
      ShowInsertButton="True" 
      ValidationGroup="EmployeeDetailsView" />

  <genome:GenomeDataSource ID="EmployeeDataSource" runat="server" 
      AutoCommit="False" AutoLock="False" 
      DataSourceProviderMemberName="GetEmployee" 
      DataSourceProviderTypeName="WebApp.EmployeeDetails" 
      ElementTypeName="Northwind.Business.Employee"
      DataDomainRole="<%$AppSettings: DataDomainRole%>" 
      OnInserted="EmployeeDataSource_Inserted" 
      OnUpdated="EmployeeDataSource_Updated" 
      OnDeleted="EmployeeDataSource_Deleted">
    <Parameters>
      <asp:QueryStringParameter Name="key" QueryStringField="datakey" />
    </Parameters>
  </genome:GenomeDataSource>
    
  <asp:DetailsView ID="EmployeeDetailsView" runat="server" 
      EmptyDataText="No item selected"
      AutoGenerateRows="False" DefaultMode="ReadOnly"
      DataKeyNames="datakey" 
      OnModeChanged="EmployeeDetailsView_ModeChanged"      
      DataSourceID="EmployeeDataSource">
    <Fields>
      <asp:BoundField DataField="EmployeeId" HeaderText="Employee Id" SortExpression="EmployeeId" ReadOnly="True" InsertVisible="False" />
      <asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="TitleOfCourtesy" HeaderText="Title Of Courtesy" SortExpression="TitleOfCourtesy" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="BirthDate" HeaderText="Birth Date" SortExpression="BirthDate" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="HireDate" HeaderText="Hire Date" SortExpression="HireDate" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Region" HeaderText="Region" SortExpression="Region" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="PostalCode" HeaderText="Postal Code" SortExpression="PostalCode" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="HomePhone" HeaderText="Home Phone" SortExpression="HomePhone" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Extension" HeaderText="Extension" SortExpression="Extension" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="Notes" HeaderText="Notes" SortExpression="Notes" ReadOnly="False" InsertVisible="True" />
      <asp:BoundField DataField="PhotoPath" HeaderText="Photo Path" SortExpression="PhotoPath" ReadOnly="False" InsertVisible="True" />
    </Fields>
  </asp:DetailsView>

        

Requirements

Namespace: TechTalk.Genome.Extensions.Web.UI.Controls

Assembly: TechTalk.Genome.Extensions.Web (in TechTalk.Genome.Extensions.Web.dll)

Version: 4.2.4.4

Editions: Professional, Evaluation, Express

See Also

DetailsViewCommandBar Members | TechTalk.Genome.Extensions.Web.UI.Controls Namespace