Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q1 2012 released 04/11/2012
select

Input / Using RadInputManager

Next database reset in 0 hours, 24 minutes, 34 seconds
Add new recordRefresh
 OrderIDOrderDateFreightShipAddressShipPostalCode 
Page size:
select
 796 items in 80 pages
10248Thursday, July 04, 199632.3859 rue de l'Abbaye51100
10249Friday, July 05, 199611.61Luisenstr. 4844087
10250Monday, July 08, 199665.83Rua do Paço, 6705454-876
10251Monday, July 08, 199641.342, rue du Commerce69004
10252Tuesday, July 09, 199651.30Boulevard Tirou, 255B-6000
10253Wednesday, July 10, 199658.17Rua do Paço, 6705454-876
10254Thursday, July 11, 199622.98Hauptstr. 313012
10255Friday, July 12, 1996148.33Starenweg 51204
10256Monday, July 15, 199613.97Rua do Mercado, 1208737-363
10257Tuesday, July 16, 199681.91Carrera 22 con Ave. Carlos Soublette #8-355022

  • Using this technique you will significantly decrease the input editors loading time since plain MS TextBoxes will be created (instead of the corresponding RadInput controls) and the data entered by the end user will be automatically filtered by RadInputManager, based on the input manager settings. The performance benefit can be quite significant:
    • The same number of input controls will be loaded up to 10 times faster
    • The maximum number of input controls allowed on the page can be 10 times greater

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Input_Examples_RadInputManager_DynamicInputFilterSettings_DefaultCS" %>

    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server"></qsf:HeadTag>
        <style type="text/css">
            .invalid
            {
                color: red !important;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="mainForm" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="C#" ShowDbResetTimer="true"></qsf:Header>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
        <!-- content start -->
        <div>
            <telerik:RadInputManager ID="RadInputManager1" runat="server">
                <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1" InitializeOnClient="false">
                </telerik:TextBoxSetting>
                <telerik:DateInputSetting BehaviorID="DateInputBehavior1" InitializeOnClient="false"
                    Culture="en-US" DateFormat="MM/dd/yyyy">
                </telerik:DateInputSetting>
                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" InitializeOnClient="false"
                    Type="Number" DecimalDigits="2">
                </telerik:NumericTextBoxSetting>
                <telerik:RegExpTextBoxSetting BehaviorID="RegExpBehavior1" InitializeOnClient="false"
                    ErrorMessage="Invalid ShipPostalCode" InvalidCssClass="invalid" ValidationExpression="[\w\d-]{4,10}">
                    <Validation IsRequired="true" />
                </telerik:RegExpTextBoxSetting>
            </telerik:RadInputManager>
            <telerik:RadGrid 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" />
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                        <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" />
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                        <FormTemplate>
                            <table cellspacing="2" cellpadding="1" width="100%" border="0">
                                <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='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                            CommandName='<%# (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>
    <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" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="OrderDate" Type="DateTime" />
                    <asp:Parameter Name="Freight" Type="Decimal" />
                    <asp:Parameter Name="ShipAddress" Type="String" />
                    <asp:Parameter Name="ShipPostalCode" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="OrderDate" Type="DateTime" />
                    <asp:Parameter Name="Freight" Type="Decimal" />
                    <asp:Parameter Name="ShipAddress" Type="String" />
                    <asp:Parameter Name="ShipPostalCode" Type="String" />
                    <asp:Parameter Name="OrderID" Type="Int32" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </div>
        <!-- content end -->
        <qsf:Footer ID="Footer1" runat="server"></qsf:Footer>
        </form>
    </body>
    </html>

Get more than expected!

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2012 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451