Represents a Genome Set or a persistent object to data bound controls.
For a list of all members of this type, see GenomeDataSource Members.
System.Object
Control
DataSourceControl
GenomeDataSource
The GenomeDataSource is an ASP.NET data source control that represents a Genome Set or a persistent object to data-bound controls. You can use the GenomeDataSource control in conjunction with a data-bound control to display, edit, and sort data on a Web page with little or no code.
When using GenomeDataSource, operations such as paging and sorting are optimised by using the power of the underlying database server. This server-side optimisation makes it possible to efficiently bind a large Set of objects to a pageable data-bound control, as GenomeDataSource can load just the necessary page of objects into memory.
Similarly to ObjectDataSource, GenomeDataSource uses reflection to call a user-defined method when it has to retrieve data.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebTest._Default" %>
<%@ Register Assembly="TechTalk.Genome.Extensions.Web" Namespace="TechTalk.Genome.Extensions.Web.UI"
TagPrefix="cc1" %>
<!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>GenomeDataSource - Sample</title>
</head>
<body>
<form id="form1" runat="server">
<cc1:genomedatasource
id="GenomeDataSource1" runat="server"
DataSourceProviderMemberName="GetAllEmployees"
DataSourceProviderTypeName="WebTest.DataSourceProvider"
ElementTypeName="Northwind.Business.Employee"
DataDomainRole="northwind"
AutoCommit="True"/>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="GenomeDataSource1"
AllowPaging="True"
AllowSorting="true">
<Columns>
<asp:BoundField DataField="TitleOfCourtesy" HeaderText="TitleOfCourtesy" SortExpression="TitleOfCourtesy" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
<asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<asp:BoundField DataField="Extension" HeaderText="Extension" SortExpression="Extension" />
<asp:BoundField DataField="EmployeeId" HeaderText="EmployeeId" ReadOnly="True" SortExpression="EmployeeId" InsertVisible="False" />
<asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
<asp:BoundField DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="PhotoPath" HeaderText="PhotoPath" SortExpression="PhotoPath" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="Region" HeaderText="Region" SortExpression="Region" />
<asp:BoundField DataField="HomePhone" HeaderText="HomePhone" SortExpression="HomePhone" />
</Columns>
</asp:GridView>
Namespace: TechTalk.Genome.Extensions.Web.UI
Assembly: TechTalk.Genome.Extensions.Web (in TechTalk.Genome.Extensions.Web.dll)
Version: 4.2.4.4
Editions: Professional, Evaluation, Express
GenomeDataSource Members | TechTalk.Genome.Extensions.Web.UI Namespace