<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="Input_Examples_RadInputManager_DynamicInputFilterSettings_DefaultVB" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
<telerik:AjaxUpdatedControl ControlID="RadInputManager1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
<telerik:RadInputManager RenderMode="Lightweight" ID="RadInputManager1" runat="server">
<telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" InitializeOnClient="false">
</telerik:TextBoxSetting>
<telerik:DatePickerSetting BehaviorID="DatePickerBehavior1" InitializeOnClient="false"
Culture="en-US" DateFormat="MM/dd/yyyy">
</telerik:DatePickerSetting>
<telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" InitializeOnClient="false"
Type="Number" DecimalDigits="2">
</telerik:NumericTextBoxSetting>
<telerik:RegExpTextBoxSetting BehaviorID="RegExpBehavior1" InitializeOnClient="false"
ErrorMessage="Invalid ShipPostalCode" ValidationExpression="[\w\d-]{4,10}">
<Validation IsRequired="true"></Validation>
</telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>
<div id="demo" class="demo-container no-bg">
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowMultiRowEdit="true"
GridLines="None" AllowPaging="True" OnItemCreated="RadGrid1_ItemCreated" AllowAutomaticUpdates="true"
AllowAutomaticInserts="true" AllowAutomaticDeletes="true" AllowSorting="true">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1"
CommandItemDisplay="Top">
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<Columns>
<telerik:GridEditCommandColumn ButtonType="FontIconButton">
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID"
ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate"
SortExpression="OrderDate" UniqueName="OrderDate" DataFormatString="{0:D}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal" HeaderText="Freight"
SortExpression="Freight" UniqueName="Freight">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipAddress" HeaderText="ShipAddress" SortExpression="ShipAddress"
UniqueName="ShipAddress">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode" SortExpression="ShipPostalCode"
UniqueName="ShipPostalCode">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton">
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<table cellspacing="2" cellpadding="1" width="100%" border="0">
<colgroup>
<col style="width: 200px;" />
<col />
</colgroup>
<tr>
<td colspan="2">
<b>Order:
<%# Eval("OrderID") %>
</b>
</td>
</tr>
<tr>
<td>OrderDate:
</td>
<td>
<asp:TextBox Width="200px" ID="TextBox1" runat="server" Text='<%# Bind("OrderDate") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>Freight:
</td>
<td>
<asp:TextBox Width="200px" ID="TextBox2" runat="server" Text='<%# Bind("Freight") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>ShipAddress:
</td>
<td>
<asp:TextBox Width="200px" ID="TextBox3" runat="server" Text='<%# Bind("ShipAddress") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>ShipPostalCode:
</td>
<td>
<asp:TextBox Width="200px" ID="TextBox4" runat="server" Text='<%# Bind("ShipPostalCode") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="Button1" runat="server" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update") %>'></asp:Button>
<asp:Button ID="Button2" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel"></asp:Button>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString35 %>"
DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @OrderID" InsertCommand="INSERT INTO [Orders] ([OrderDate], [Freight], [ShipAddress], [ShipPostalCode]) VALUES (@OrderDate, @Freight, @ShipAddress, @ShipPostalCode)"
SelectCommand="SELECT * FROM [Orders]" UpdateCommand="UPDATE [Orders] SET [OrderDate] = @OrderDate, [Freight] = @Freight, [ShipAddress] = @ShipAddress, [ShipPostalCode] = @ShipPostalCode WHERE [OrderID] = @OrderID">
<DeleteParameters>
<asp:Parameter Name="OrderID" Type="Int32"></asp:Parameter>
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="OrderDate" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="Freight" Type="Decimal"></asp:Parameter>
<asp:Parameter Name="ShipAddress" Type="String"></asp:Parameter>
<asp:Parameter Name="ShipPostalCode" Type="String"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="OrderDate" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="Freight" Type="Decimal"></asp:Parameter>
<asp:Parameter Name="ShipAddress" Type="String"></asp:Parameter>
<asp:Parameter Name="ShipPostalCode" Type="String"></asp:Parameter>
<asp:Parameter Name="OrderID" Type="Int32"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>
</form>
</body>
</html>