|
Tento článek byl přeložen strojově počítačem. Původní text zobrazíte přesunutím ukazatele myši nad jednotlivé věty článku. Další informace
|
Překlad
Originál
|
DetailsView.ModeChanging – událost
Obor názvů: System.Web.UI.WebControls
Sestavení: System.Web (v System.Web.dll)
<%@ 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 CustomerDetailView_ModeChanging(Object sender, DetailsViewModeEventArgs e) { // Disable the paging feature in edit mode. if (e.NewMode == DetailsViewMode.Edit) { CustomerDetailView.AllowPaging = false; } else { CustomerDetailView.AllowPaging = true; } } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>DetailsView ModeChanging Example</title> </head> <body> <form id="Form1" runat="server"> <h3>DetailsView ModeChanging Example</h3> <asp:detailsview id="CustomerDetailView" datasourceid="DetailsViewSource" datakeynames="CustomerID" autogeneraterows="true" autogenerateeditbutton="true" allowpaging="true" onmodechanging="CustomerDetailView_ModeChanging" runat="server"> <fieldheaderstyle backcolor="Navy" forecolor="White"/> </asp:detailsview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the web.config file. --> <asp:SqlDataSource ID="DetailsViewSource" runat="server" ConnectionString= "<%$ ConnectionStrings:NorthWindConnectionString%>" InsertCommand="INSERT INTO [Customers]([CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country]) VALUES (@CustomerID, @CompanyName, @Address, @City, @PostalCode, @Country)" SelectCommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"> </asp:SqlDataSource> </form> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (role Server Core není podporována), Windows Server 2008 R2 (role Server Core je podporována s aktualizací SP1 nebo novější, architektura Itanium není podporována)
.NET Framework nepodporuje některé verze platforem. Seznam podporovaných verzí naleznete v tématu Požadavky na systém rozhraní .NET framework.