PowerTools SPREAD for ASP.NET 8.0J
CompletionInterval プロパティ

Webサービスを使用してオートコンプリートの候補を提示するためにタイマーが作動するまでの時間(ミリ秒単位)を取得または設定します。
構文
'Declaration
 
Public Property CompletionInterval As Integer
public int CompletionInterval {get; set;}

プロパティ値

タイマーの間隔(ミリ秒単位)を表すInteger
解説
オートコンプリートの間隔はミリ秒単位です。
次のサンプルコードは、オートコンプリート型セル用のWebサービスを使用します。
FarPoint.Web.Spread.Extender.AutoCompleteCellType ac = new FarPoint.Web.Spread.Extender.AutoCompleteCellType();
ac.BackgroundImageUrl = null;
ac.CompletionInterval = 1000;
ac.CompletionSetCount = 5;
ac.DelimiterCharacters = ";, :";
AjaxControlToolkit.TextBoxWatermarkExtender twe = new AjaxControlToolkit.TextBoxWatermarkExtender();
twe.WatermarkText = "Type a character";
ac.Extenders.Add(twe);
ac.ServicePath = "WebService.asmx";
ac.ServiceMethod = "GetAllNames";
ac.MinimumPrefixLength = 1;
ac.EnableCaching = true;
ac.ShowEditor = true;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = ac;

public class WebService : System.Web.Services.WebService {
    
        [WebMethod]

  public  string[] GetAllNames(string prefixText, int count)
  {
        ArrayList filteredList = new ArrayList();
        string[] names = {"AzamSharp","Scott","Alex","Mary","John","Ali","Sam","Sammy"};
        foreach (string name in names)
        {
                if (name.ToLower().StartsWith(prefixText.ToLower()))
                filteredList.Add(name);
        }
        return (string[]) filteredList.ToArray(typeof(string));
  }
}
Dim ac As New FarPoint.Web.Spread.Extender.AutoCompleteCellType
ac.BackgroundImageUrl = Nothing
ac.CompletionInterval = 1000
ac.CompletionSetCount = 5
ac.DelimiterCharacters = ";, :"
Dim twe As New AjaxControlToolkit.TextBoxWatermarkExtender
twe.WatermarkText = "Type a character"
ac.Extenders.Add(twe)
ac.ServicePath = "WebService.asmx"
ac.ServiceMethod = "GetAllNames"
ac.MinimumPrefixLength = 1
ac.EnableCaching = True
ac.ShowEditor = True
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = ac

Public Class WebService
     Inherits System.Web.Services.WebService

    <WebMethod()>
    Public Function GetAllNames(ByVal prefixText As String, ByVal count As Integer) As String()
        Dim filteredList As ArrayList = New ArrayList
        Dim names() As String = {"AzamSharp", "Scott", "Alex", "Mary", "John", "Ali", "Sam", "Sammy"}

        For Each name As String In names
            If name.ToLower.StartsWith(prefixText.ToLower) Then
                filteredList.Add(name)
            End If
        Next
        Return CType(filteredList.ToArray(GetType(System.String)), String())
    End Function

End Class
参照

AutoCompleteCellType クラス
AutoCompleteCellType メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.