| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!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></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <table> |
| <tr> |
| <td> |
| <div> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server"> |
| <Items> |
| <telerik:RadPanelItem runat="server" Text="LargeMenu"> |
| <Items> |
| <telerik:RadPanelItem runat="server" Text="SubMenu1"> |
| </telerik:RadPanelItem> |
| <telerik:RadPanelItem runat="server" Text="SubMenu2"> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
| </div> |
| </td> |
| <td> |
| <div > |
| <iframe id="LinkFrame" src="http://www.google.com" />/> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </form> |
| </body> |
| </html> |
| <div style="background: url(/images/gridbg.jpg) no-repeat; width: 740px"> |
| <div style="float: right; margin: 10px 10px 5px 0px; color: #2a6ca3; font-size: 11px; |
| vertical-align: middle;"> |
| <table cellpadding="0" cellspacing="0"> |
| <tr valign="middle"> |
| <td> |
| <asp:Label ID="lblFilter" runat="server" Text="Filter:"></asp:Label></td> |
| <td style="padding-left: 5px;"> |
| <telerik:RadComboBox ID="rcbFieldName" Skin="Telerik" runat="server"> |
| <Items> |
| <telerik:RadComboBoxItem Text="Branch" Value="Branch" runat="server" /> |
| <telerik:RadComboBoxItem Text="Employee Name" Value="Employee Name" runat="server" /> |
| </Items> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
| </td> |
| <td style="padding-left: 5px;"> |
| <asp:TextBox ID="txtSearch" runat="server" Style="vertical-align: middle"></asp:TextBox></td> |
| <td style="padding-left: 5px;"> |
| <asp:ImageButton ID="btnSearch" runat="server" ImageUrl="/images/FilterGo.gif" /></td> |
| <td style="padding-left: 5px;"> |
| <asp:ImageButton ID="btnShowAll" runat="server" ImageUrl="/images/FilterCancel.gif" |
| AlternateText="Cancel Filter / Show All" /></td> |
| </tr> |
| </table> |
| </div> |
| <div class="buttonTop" style="margin-top: 10px; margin-left: 10px;"> |
| <table cellpadding="0" cellspacing="0"> |
| <tr valign="middle"> |
| <td> |
| <asp:ImageButton runat="server" ID="ImageExport" AlternateText="Export to Excel" |
| ImageUrl="/images/FileManager/Icons/xls.gif" /> |
| <asp:ImageButton OnClientClick="CustomAction(); return false;" runat="server" ID="ImageButton1" |
| AlternateText="Export to Excel" ImageUrl="/images/FileManager/Icons/xls.gif" |
| Visible="false" /></td> |
| <td style="padding-left: 5px;"> |
| Export to Excel</td> |
| </tr> |
| </table> |
| </div> |
| <div style="clear: both;"> |
| </div> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="10"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' |
| style="border: 0px;" /> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AllowPaging="True" |
| AllowSorting="true" AutoGenerateColumns="false" GridLines="None" Skin="Outlook"> |
| <MasterTableView DataKeyNames="CuId,BarcodeID"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <NestedViewTemplate> |
| <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false"> |
| <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("BarcodeID") %>' |
| Visible="false" runat="server" /> |
| <telerik:RadGrid runat="server" ID="ResponseGrid" DataSourceID="SqlDataSource2" AllowSorting="true"> |
| <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" |
| DataKeyNames="BarcodeID" PageSize="5"> |
| <Columns> |
| <telerik:GridBoundColumn SortExpression="BarcodeID" HeaderText="ID" HeaderButtonType="TextButton" |
| DataField="BarcodeID" UniqueName="BarcodeID"> |
| <HeaderStyle /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="MemberName" HeaderText="Member Name" HeaderButtonType="TextButton" |
| DataField="MemberName" UniqueName="MemberName"> |
| <HeaderStyle /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="EmailAddress" HeaderText="Email Address" |
| HeaderButtonType="TextButton" DataField="EmailAddress" UniqueName="EmailAddress"> |
| <HeaderStyle /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="EmployeeName" HeaderText="Employee Name" |
| HeaderButtonType="TextButton" DataField="EmployeeName" UniqueName="EmployeeName"> |
| <HeaderStyle /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn SortExpression="BranchName" UniqueName="BranchName" HeaderButtonType="TextButton" |
| DataField="BranchName" HeaderText="Branch Name"> |
| <HeaderStyle /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" |
| ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CE_SurveyResponseCuId WHERE BarcodeID = @BarcodeID" |
| runat="server"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="BarcodeID" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| </asp:Panel> |
| </NestedViewTemplate> |
| <Columns> |
| <telerik:GridDateTimeColumn UniqueName="Receipt" HeaderText="Date<br>Received" DataField="Receipt" |
| DataFormatString="{0:MM/dd/yyyy}"> |
| <HeaderStyle Width="100px" HorizontalAlign="center" /> |
| </telerik:GridDateTimeColumn> |
| <telerik:GridDateTimeColumn UniqueName="TransDate" HeaderText="Transaction<br>Date" |
| DataField="TransDate" DataFormatString="{0:MM/dd/yyyy}"> |
| <HeaderStyle Width="100px" HorizontalAlign="center" /> |
| </telerik:GridDateTimeColumn> |
| <telerik:GridBoundColumn DataField="Question1" DataType="System.Double" HeaderText="Qu<br />1" |
| UniqueName="Question1"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question2" DataType="System.Double" HeaderText="Qu<br />2" |
| SortExpression="Question2" UniqueName="Question2"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question3" DataType="System.Double" HeaderText="Qu<br />3" |
| SortExpression="Question3" UniqueName="Question3"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question4" DataType="System.Double" HeaderText="Qu<br />4" |
| SortExpression="Question4" UniqueName="Question4"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question5" DataType="System.Double" HeaderText="Qu<br />5" |
| SortExpression="Question5" UniqueName="Question5"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question6" DataType="System.Double" HeaderText="Qu<br />6" |
| SortExpression="Question6" UniqueName="Question6"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question7" DataType="System.Double" HeaderText="Qu<br />7" |
| SortExpression="Question7" UniqueName="Question7"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question8" DataType="System.Double" HeaderText="Qu<br />8" |
| SortExpression="Question8" UniqueName="Question8"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question9" DataType="System.Double" HeaderText="Qu<br />9" |
| SortExpression="Question9" UniqueName="Question9"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Question10" DataType="System.Double" HeaderText="Qu<br />10" |
| SortExpression="Question10" UniqueName="Question10"> |
| <HeaderStyle HorizontalAlign="center" Width="30px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments" |
| UniqueName="Comments"> |
| <HeaderStyle HorizontalAlign="center" /> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| </div> |
| Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSearch.Click |
| Dim searchtext As String = Trim(txtSearch.Text.ToString) |
| Literal1.Text &= "searchtext=" & searchtext & "<br>" |
| If Len(searchtext) > 0 Then |
| Select Case Me.rcbFieldName.SelectedValue |
| Case "Branch" |
| Literal1.Text &= "branch selected<br>" |
| RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND BranchName = '" & searchtext & "'") |
| Literal1.Text &= "SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND BranchName = '" & searchtext & "'<br>" |
| RadGrid1.Rebind() |
| Session("GridSource") = RadGrid1.DataSource |
| Case "Employee Name" |
| Literal1.Text &= "employee name selected<br>" |
| RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND EmployeeName LIKE '%" & searchtext & "%'") |
| Literal1.Text &= "SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND EmployeeName LIKE '%" & searchtext & "%'<br>" |
| RadGrid1.Rebind() |
| Session("GridSource") = RadGrid1.DataSource |
| End Select |
| End If |
| End Sub |
| Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource |
| If Session("GridSource") Is Nothing Then |
| RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "')") |
| Session("GridSource") = RadGrid1.DataSource |
| Else |
| RadGrid1.DataSource = Session("GridSource") |
| End If |
| End Sub |
| Public Function GetDataTable(ByVal query As String) As DataTable |
| Dim ConnString As String = ConfigurationManager.ConnectionStrings("SiteSqlServer").ConnectionString |
| Dim conn As SqlConnection = New SqlConnection(ConnString) |
| Dim adapter As SqlDataAdapter = New SqlDataAdapter |
| adapter.SelectCommand = New SqlCommand(query, conn) |
| Dim table1 As New DataTable |
| conn.Open() |
| Try |
| adapter.Fill(table1) |
| Finally |
| conn.Close() |
| End Try |
| Return table1 |
| End Function |
Improve you web page load time with the flexible, lightweight RadSiteMap control for ASP.NET AJAX. This UI component with its efficient semantic rendering gives you a lightning fast solution and highly optimized HTML output. With the ease of Telerik’s SiteMap for ASP.NET AJAX you can organize and list the pages on your web site, customize the layout, choose from a variety of appearance options and templates. Add value to your web site by optimizing it for crawler and search engines with no extra development effort.
Semantic Rendering for Minimal HTML
The Telerik ASP.NET
SiteMap implements a highly efficient semantic rendering, which results in
minimum HTML output and dramatically improves performance.
Flexible layouts
You can configure the layout of
RadSiteMap in a variety of modes. The nodes can be viewed in either list or flow
state. By selecting the flow property items in the group will be arranged in
rows one after the other, instead of displaying them as a list. End-users can
also alternate between single, multi-column, horizontal or vertical view. In
addition you can display node lines in a fashion similar to RadTreeView and
collapse the hierarchy.
Templates
The ASP.NET SiteMap by Telerik allows you to
define a collection of dynamic templates that customize the presentation of the
hierarchy and the individual nodes. You can apply per-level, per-node and global
templates and add extra information, such as images, links to additional
sources, etc.
Appearance
RadSiteMap is shipped with a rich set of skins
that allow you to easily build slick interfaces with the look-and-feel of
Windows Vista, Office 2007, Outlook, etc. The skins can be easily switched using
a single property. This significantly simplifies styling even for complex
configurations.
Industry-Best Cross-Browser Support
Following our long
tradition of industry best cross-browser support, Telerik ASP.NET SiteMap
doesn’t make an exception. The component supports all major browsers, including
Internet Explorer, Firefox, Safari, Opera and Google Chrome and produces
identical results.
Search Engine Friendly
RadSiteMap completely follows the
principles of Search Engine Optimization. The control's innovative rendering
generates semantic lists and standard <a> tags, which are properly
recognized and highly valued by search engines. As a result, all content
accessible through this control will be automatically indexed and ranked with no
extra effort required from the developer.
Codeless Test Automation for RadSiteMap
Now you can
record, execute and debug functional tests for RadSiteMap without leaving the
familiar Visual Studio environment. Telerik WebUI Test Studio is an advanced
click and play web application testing tool specialized for automating ASP.NET
AJAX applications. The Studio ships with special translators for Telerik
RadControls for ASP.NET AJAX.
To get familiar with the control please follow these online resources: