按照在线示例(http://fineui.com/demo/#/demo/autocomplete/inline.aspx)中的自动补全是没问题的。但是把自动补全功能用于弹出window的时候,发现下拉列表无法显示,但使用↓↑键可以使得文本框显示选中的内容。不知道这是什么原因,被遮挡了么。请各位大大不吝赐教,谢谢~
代码如下:
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ArchiveShelfInfoQuery.aspx.cs"
- Inherits="ArchivesWebSite.Query.ArchiveShelfInfoQuery" %>
- <!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">
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <title></title>
- <link href="../Css/main.css" rel="stylesheet" type="text/css" />
- <link href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet"
- type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server">
- <x:PageManager ID="pm_Main" AutoSizePanelID="pnl_Main" runat="server" />
- <x:Panel ID="pnl_Main" runat="server" EnableBackgroundColor="true" BodyPadding="3px"
- Height="" Title="档案查询" ShowBorder="false" ShowHeader="False" Layout="Fit">
- <Toolbars>
- <x:Toolbar ID="tlr_Btn" runat="server">
- <Items>
- <x:Button ID="btn_Search" Icon="DatabaseConnect" OnClick="btn_Search_Click" Text="查询"
- runat="server">
- </x:Button>
- <x:Button ID="btnShowInfo" Icon="DatabaseConnect" OnClick="btn_ShowInfo_Click" Text="详细"
- runat="server" Visible="False">
- </x:Button>
- <x:Button ID="btn_Export" Icon="DatabaseTable" OnClick="btn_Export_Click" Text="导出"
- runat="server" DisableControlBeforePostBack="False" EnableAjax="False" Visible="False">
- </x:Button>
- <x:ToolbarFill ID="tbf_t" runat="server">
- </x:ToolbarFill>
- <x:DropDownList ID="ddl_PageSize" AutoPostBack="true" Width="80" OnSelectedIndexChanged="ddl_PageSize_SelectedIndexChanged"
- runat="server">
- <x:ListItem Text="每页15条" Value="15" />
- <x:ListItem Text="每页20条" Value="20" Selected="true" />
- <x:ListItem Text="每页30条" Value="30" />
- <x:ListItem Text="每页50条" Value="50" />
- </x:DropDownList>
- <x:Label ID="lbl_c" runat="server" Width="3">
- </x:Label>
- <x:DropDownList ID="ddl_Search" AutoPostBack="true" Width="80" OnSelectedIndexChanged="ddl_Search_SelectedIndexChanged"
- runat="server" Visible="False">
- <x:ListItem Text="档案条码" Value="KeyD" />
- <x:ListItem Text="档案名称" Value="NameD" />
- </x:DropDownList>
- <x:Label ID="lbl_r" runat="server" Width="3">
- </x:Label>
- <x:TwinTriggerBox ID="ttb_Search" runat="server" Width="150" EmptyText="输入要搜索的关键字"
- ShowTrigger1="false" OnTrigger1Click="ttb_Search_Trigger1Click" OnTrigger2Click="ttb_Search_Trigger2Click"
- Trigger1Icon="Clear" Trigger2Icon="Search" Visible="False">
- </x:TwinTriggerBox>
- </Items>
- </x:Toolbar>
- </Toolbars>
- <Items>
- <x:Grid ID="gr_Main" ShowHeader="False" runat="server" EnableCheckBoxSelect="true"
- AllowSorting="true" PageSize="20" ShowBorder="true" AllowPaging="true" EnableTextSelection="true"
- OnSort="Gr_Sort" IsDatabasePaging="true" OnPageIndexChange="Gr_PageIndexChange"
- OnRowCommand="Gr_RowCommand" OnRowDataBound="Gr_RowDataBound" OnPreRowDataBound="Gr_PreRowDataBound"
- DataKeyNames="AC_ID" AutoScroll="true" EnableRowDoubleClick="False" OnRowDoubleClick="Gr_RowDoubleClick">
- <Columns>
- <x:TemplateField Width="30px">
- <ItemTemplate>
- <%# gr_Main.PageIndex * gr_Main.PageSize+ Container.DataItemIndex + 1%>
- </ItemTemplate>
- </x:TemplateField>
- <x:BoundField HeaderText="条码号" SortField="AC_Barcode" DataField="AC_Barcode" />
- <x:BoundField HeaderText="档案提名" SortField="AC_Title" DataField="AC_Title" ExpandUnusedSpace="true" />
- <x:BoundField HeaderText="档案描述" SortField="AC_Description" DataField="AC_Description" />
- <x:BoundField HeaderText="档案类型" SortField="AC_Type" DataField="AC_Type" />
- <x:BoundField HeaderText="档案有效期" SortField="AC_Expire_Date" DataField="AC_Expire_Date" />
- <x:BoundField HeaderText="档案入库时间" SortField="Create_Time" DataField="Create_Time" />
- </Columns>
- </x:Grid>
- </Items>
- </x:Panel>
- <x:Window ID="winShowInfo" Hidden="true" EnableIFrame="true" Icon="ApplicationFormEdit"
- Target="Parent" runat="server" CloseAction="HidePostBack" IsModal="true" Width="880px"
- Height="550px" OnClose="win_Edit_Close">
- </x:Window>
- <x:Window ID="win_Search" Title="详细查询" Hidden="true" Icon="ApplicationFormMagnify"
- Target="Self" runat="server" IsModal="False" CloseAction="HidePostBack" OnClose="win_Search_Close"
- Width="600px" Height="332px">
- <Items>
- <x:Panel ID="pnl_Search" runat="server" Layout="Fit" ShowBorder="False" ShowHeader="false"
- Height="300px" EnableBackgroundColor="true">
- <Items>
- <x:Form ID="sf_Search" BodyPadding="25px 15px" LabelWidth="100" AutoScroll="true"
- ShowBorder="false" ShowHeader="false" EnableBackgroundColor="true" runat="server">
- <Rows>
- <x:FormRow ColumnWidths="100%">
- <Items>
- <x:TextBox ID="tbxArchiveShelf" runat="server" Label="架位号" EmptyText="输入架位号">
- </x:TextBox>
- </Items>
- </x:FormRow>
- </Rows>
- </x:Form>
-
- </Items>
- <Toolbars>
- <x:Toolbar ID="tbr_Search" Position="Bottom" runat="server">
- <Items>
- <x:ToolbarFill ID="tf_sb" runat="server">
- </x:ToolbarFill>
- <x:Button ID="btn_XSearch" Text="查询" ValidateForms="sf_Search" runat="server" Icon="TextRuler"
- OnClick="btn_XSearch_Click">
- </x:Button>
- <x:Button ID="btn_Return" Text="返回" runat="server" Icon="BulletGo" OnClick="btn_Return_Click">
- </x:Button>
- </Items>
- </x:Toolbar>
- </Toolbars>
- </x:Panel>
- </Items>
- </x:Window>
- </form>
- <script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
- <script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
- <script type="text/javascript">
- function onReady() {
- /*Ext.getDoc().on("contextmenu", function (e) {//禁用右键
- e.stopEvent();
- });*/
- var tbxArchiveShelfID = '<%= tbxArchiveShelf.ClientID %>';
- var availableTags = [
- "ActionScript",
- "AppleScript",
- "Asp",
- "BASIC",
- "C",
- "C++",
- "Clojure",
- "COBOL",
- "ColdFusion",
- "Erlang",
- "Fortran",
- "Groovy",
- "Haskell",
- "Java",
- "JavaScript",
- "Lisp",
- "Perl",
- "PHP",
- "Python",
- "Ruby",
- "Scala",
- "Scheme"];
-
- $('#' + tbxArchiveShelfID).autocomplete({
- source: availableTags
- });
- }
- </script>
- </body>
- </html>
复制代码
|