20
修改AutoComplete下拉選單寬度
AutoCompleteExtender的樣式,若要設定下拉選單的寬度比原本的欄位還要長,
就要修改CSS樣式,如下:
<style type=”text/css”>
.autocomplete_completionListElement_Empl
{
margin: 0px !important;
cursor: pointer;
overflow: auto;
width: 120px !important;
height: 200px;
text-align: left;
list-style-type: none;
/*
background-color: inherit;
color: windowtext;
border: buttonshadow;
border-width: 1px;
border-style: solid;
font-size: 10pt;
*/
}
</style>
PS. 就是這個啦!【 width: 120px !important; 】
<cc1:AutoCompleteExtender ID=”AutoCompleteExtender_empl” runat=”server” TargetControlID=”tbemplno”
MinimumPrefixLength=”1″ FirstRowSelected=”true” OnClientItemSelected=”ClientItemSelected_emplname”
ServiceMethod=”GetEmpl” CompletionInterval=”100″
CompletionListCssClass=”autocomplete_completionListElement_Empl”
ServicePath=”../WebService/OT_AutoComplete_ws.asmx”
CompletionSetCount=”25″>
</cc1:AutoCompleteExtender>
There are no comments.