Atlas中,默认的AutoComplete Extender并没有提供滚动条,可以定义一个Panel 或者Div作为下拉区域附加到AutoComplete Extender,并定义Panel或者Div的样式,让它具有滚动条就可以了。

定义Panel作为下拉区:

[小技巧]为Atlas AutoComplete加上滚动条<asp:Panel ID="dropdown" Height="100px" ScrollBars=Vertical runat=server></asp:Panel>

设置AutoComplete ExtenderDropDownPanelID属性为上面定义的Panel

[小技巧]为Atlas AutoComplete加上滚动条<atlas:AutoCompleteExtender  
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条               
DropDownPanelID="dropdown" 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条               ServicePath
="AutoCompleteService.asmx" 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条               ServiceMethod
="GetSuggestions" 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条               MinimumPrefixLength
="1" 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条               runat
="server">
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条            
<atlas:AutoCompleteProperties 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条                    
TargetControlID="searchText" 
[小技巧]为Atlas AutoComplete加上滚动条
[小技巧]为Atlas AutoComplete加上滚动条                    Enabled
="true" />
[小技巧]为Atlas AutoComplete加上滚动条
</atlas:AutoCompleteExtender>
[小技巧]为Atlas AutoComplete加上滚动条

感兴趣的朋友可以去试一下。

英文地址:http://blogs.msdn.com/piyush/archive/2006/10/17/autocomplete-with-scroll-bar.aspx

相关文章:

  • 2022-12-23
  • 2021-10-03
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2021-09-03
  • 2021-09-29
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-09-09
相关资源
相似解决方案