PowerTools InputMan for ASP.NET 8.0J
SelectedIndexChanged プロパティ (ComboClientEvents)
使用例 

SelectedIndexChangedクライアントイベントを取得または設定します。
構文
Public Property SelectedIndexChanged As String
public string SelectedIndexChanged {get; set;}
解説
SelectedIndexChangedクライアントイベントは、GcComboBoxクラスのGcComboBox.ClientEvents プロパティが参照する、ComboClientEventsオブジェクトのSelectedIndexChangedプロパティで指定します。

サーバーコードからクライアントイベントハンドラを作成する場合、GcComboBoxクラスのClientEventsプロパティを使用します。 尚、クライアント側のスクリプトはJavaScriptによって記述し、ASPXページに実装します。

SelectedIndexChangedイベントは、SelectedIndexプロパティが変更されるとクライアント側で発生します。
使用例
次のサンプルコードは、サーバーコードにクライアント側のSelectedIndexChangedイベントを設定し、選択項目が変更されたときにその内容を取得する方法を示します。
GcComboBox1.ClientEvents.SelectedIndexChanged = "SelectedIndexChanged"
GcComboBox1.ClientEvents.SelectedIndexChanged = "SelectedIndexChanged";
function SelectedIndexChanged()
{
    var gcComboBox1 = FindIMControl("GcComboBox1")
    if (gcComboBox1.SelectedIndex == -1 ) return;
    document.getElementById("TextBox1").value = gcComboBox1.Text;
}
参照

ComboClientEvents クラス
ComboClientEvents メンバ

 

 


© 2005-2015 GrapeCity inc. All rights reserved.