限制自动完成文本框中的记录数 [英] Limit number of records in auto-complete textbox

查看:58
本文介绍了限制自动完成文本框中的记录数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用自动完成扩展程序来获取记录的建议。我已经使用了Web服务。现在当我输入一个字母时,它给出了200条记录的列表。我想在一种滚动条中只显示10条记录和其余记录,因为它占据了整个页面,同时显示了那200条记录,破坏了整个页面设计。



先谢谢。

解决方案



有一处房产自动完成扩展程序CompletionSetCount。将其设置为10,它将只显示10条记录。

此外,在正在执行的服务方法背后的代码中,您需要传递计数。例如:10。

希望这会有所帮助。

问候,
Dinesh Kumar.V。


您好b $ b

请检查下面的链接,它会对你有所帮助



http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx [ ^ ]



http://www.asp.net/ajaxlibrary/act_autocomplete_simple.ashx [ ^ ]





如有任何查询,请告知我们



谢谢

Gaurav Dhol

Skype:dhol.gaurav






传递参数ServiceMethod =GetCompletionList(10)



set CompletionSetCount =10



 <   ajaxToolkit:AutoCompleteExtender   

runat = server

ID = < span class =code-keyword> autoComplete1

TargetControlID = myTextBox

ServiceMethod = GetCompletionList(10)

ServicePath = AutoComplete.asmx

< span class =code-attribute> MinimumPrefixLength = 2

CompletionInterval = 1000

< span class =code-attribute> EnableCaching = true

< span class =code-attribute>
CompletionSetCount = 10

CompletionListCssClass = autocomplete_completionListElement

CompletionListItemCssClass = autocomplete_listItem

CompletionListHighlightedItemCssClass = autocomplete_highlightedListItem

DelimiterCharacters = ;,:

ShowOnlyCurrentWordInCompletionListItem = true >

< / ajaxToolkit:AutoCompleteExtender >


Hi,
I am using an auto-complete extender to get suggestion of records.I have used web service for it.Now when I type a letter it gives me a list of 200 records.I want to display only 10 records and rest of the records in a type of scroll-bar, as it occupies my entire page in showing those 200 records at once ruining the entire design of page.

Thanks in advance.

解决方案

Hi,

 There is a property in the auto-complete extender "CompletionSetCount". Set it to 10 and it will display only 10 records.

 Also in the code behind the service method that is being executed you need to pass the count. for eg:10.

Hope this helps.

Regards,
Dinesh Kumar.V.


Hi
Please check below link, it will help you

http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/AutoComplete/AutoComplete.aspx[^]

http://www.asp.net/ajaxlibrary/act_autocomplete_simple.ashx[^]


let me know in case of any query

Thanks
Gaurav Dhol
Skype : dhol.gaurav


Hi Please

pass parameter ServiceMethod="GetCompletionList(10)"

set CompletionSetCount="10"

<ajaxToolkit:AutoCompleteExtender

    runat="server"

    ID="autoComplete1"

    TargetControlID="myTextBox"

    ServiceMethod="GetCompletionList(10)"

    ServicePath="AutoComplete.asmx"

    MinimumPrefixLength="2"

    CompletionInterval="1000"

    EnableCaching="true"

    CompletionSetCount="10"

    CompletionListCssClass="autocomplete_completionListElement"

    CompletionListItemCssClass="autocomplete_listItem"

    CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"

    DelimiterCharacters=";, :"

    ShowOnlyCurrentWordInCompletionListItem="true">
       
</ajaxToolkit:AutoCompleteExtender>


这篇关于限制自动完成文本框中的记录数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆