none
有没有像easyui-combogrid类似的前台控件 RRS feed

  • 问题

  • 有没有像这种点击一个textbox之后下面后会显示一个gridview 的前台控件啊??我用的是asp.net

    2013年9月23日 9:12

全部回复

  • 你好,

    我建议你去使用AJAX Popup Controls,可以实现easyui-combogrid类似的前台控件功能。

    你可以尝试下面的这个例子,当然你需要安装AJAXTOOLKIT,和更换我的链接字符串。 

       <ajaxToolkit:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1" />
    <asp:TextBox ID="TextBox1" runat="server" Width="200" autocomplete="off" /><br /><br />
            <asp:Panel ID="Panel3" runat="server" CssClass="popupControl">
                <div style="border: 1px outset white; width: 100px">
                    <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                        <ContentTemplate>
                        <asp:GridView ID="GridView1" AutoGenerateColumns="true" DataSourceID="SqlDataSource1"  runat="server"></asp:GridView>  
                      <asp:SqlDataSource
              id="SqlDataSource1"  runat="server"
              ConnectionString="<%$ ConnectionStrings:MyNorthwind%>"
              SelectCommand="SELECT * FROM Employees">          
          </asp:SqlDataSource>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
            <ajaxToolkit:PopupControlExtender ID="PopupControlExtender3" runat="server"
                TargetControlID="TextBox1"
                PopupControlID="Panel3"
                CommitProperty="value"
                Position="Bottom"
                CommitScript="e.value += ' - do not forget!';" />


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2013年9月24日 10:15
    版主
  • 大侠,你的方法很接近了,但是用gridview的话,没得用键盘上下选择~~
    2013年9月25日 3:41
  • 你好,

       你想用键盘上下选择, 那么<asp:Panel > 内容,你可能要换成其他控件或使用html Table 布局 。


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2013年9月26日 9:32
    版主