ListCommandEventArgsとは? わかりやすく解説

ListCommandEventArgs クラス

List コントロールの ItemCommand イベントデータ提供します

名前空間: System.Web.UI.MobileControls
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文構文

Public Class ListCommandEventArgs
    Inherits CommandEventArgs
Dim instance As ListCommandEventArgs
public class ListCommandEventArgs : CommandEventArgs
public ref class ListCommandEventArgs : public
 CommandEventArgs
public class ListCommandEventArgs extends CommandEventArgs
public class ListCommandEventArgs extends
 CommandEventArgs
使用例使用例

ListCommandEventArgs オブジェクト使用して、項目がクリックされたときにリスト内のタスクステータス変更する方法次のコード例示します。このコード例は、List概要取り上げているコード例一部です。

メモメモ

次のコード サンプルはシングルファイル コード モデル使用しており、分離コード ファイル直接コピーされ場合正常に動作しない可能性あります。このコード サンプルは、拡張子.aspx の空のテキスト ファイルコピーする必要があります詳細については、「ASP.NET Web ページコード モデル」を参照してください

Private Sub Status_ItemCommand(ByVal
 sender As Object, _
    ByVal e As ListCommandEventArgs)

    Const spec As String
 = "You now have {0} tasks done, {1} " & _
        "tasks scheduled, and {2} tasks pending."

    ' Move selection to next status toward 'done'
    Select Case e.ListItem.Value
        Case "scheduled"
            schedCount -= 1
            pendCount += 1
            e.ListItem.Value = "pending"
        Case "pending"
            pendCount -= 1
            doneCount += 1
            e.ListItem.Value = "done"
            
    End Select

    ' Show the status of the current task
    Label1.Text = e.ListItem.Text & " is " &
 _
        e.ListItem.Value

    ' Show current selection counts
    Label2.Text = String.Format(spec, doneCount, _
        schedCount, pendCount)
End Sub
Private Sub Status_ItemCommand(ByVal sender As Object, _
    ByVal e As ListCommandEventArgs)

    Const spec As String = "You now have {0} tasks done, {1} " & _
        "tasks scheduled, and {2} tasks pending."

    ' Move selection to next status toward 'done'
    Select Case e.ListItem.Value
        Case "scheduled"
            schedCount -= 1
            pendCount += 1
            e.ListItem.Value = "pending"
        Case "pending"
            pendCount -= 1
            doneCount += 1
            e.ListItem.Value = "done"
            
    End Select

    ' Show the status of the current task
    Label1.Text = e.ListItem.Text & " is " & _
        e.ListItem.Value

    ' Show current selection counts
    Label2.Text = String.Format(spec, doneCount, _
        schedCount, pendCount)
End Sub
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
     System.Web.UI.WebControls.CommandEventArgs
      System.Web.UI.MobileControls.ListCommandEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ListCommandEventArgs コンストラクタ (MobileListItem, Object)

指定した ListItemCommandSource使用して、ListCommandEventArgs クラス新しインスタンス初期化します。

名前空間: System.Web.UI.MobileControls
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文構文

Public Sub New ( _
    item As MobileListItem, _
    commandSource As Object _
)
Dim item As MobileListItem
Dim commandSource As Object

Dim instance As New ListCommandEventArgs(item,
 commandSource)
public ListCommandEventArgs (
    MobileListItem item,
    Object commandSource
)
public:
ListCommandEventArgs (
    MobileListItem^ item, 
    Object^ commandSource
)
public ListCommandEventArgs (
    MobileListItem item, 
    Object commandSource
)
public function ListCommandEventArgs (
    item : MobileListItem, 
    commandSource : Object
)

パラメータ

item

ListItem プロパティ初期化します。

commandSource

CommandSource プロパティ初期化します。

解説解説

ListItem プロパティCommandSource プロパティは、item パラメータcommandSource パラメータの値でそれぞれ初期化されます

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ListCommandEventArgs コンストラクタ

ListCommandEventArgs クラス新しインスタンス初期化します。 ItemCommand デザイナでの ASP.NET モバイル コントロール使用
オーバーロードの一覧オーバーロードの一覧

名前 説明
ListCommandEventArgs (MobileListItem, Object) 指定した ListItem と CommandSource を使用してListCommandEventArgs クラス新しインスタンス初期化します。
ListCommandEventArgs (MobileListItem, Object, CommandEventArgs) 指定した ListItemCommandSource、および元のコマンド引数使用してListCommandEventArgs クラス新しインスタンス初期化します。
参照参照

関連項目

ListCommandEventArgs クラス
ListCommandEventArgs メンバ
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロール使用
デザイナでの ASP.NET モバイル コントロール使用

ListCommandEventArgs コンストラクタ (MobileListItem, Object, CommandEventArgs)

指定した ListItemCommandSource、および元のコマンド引数使用して、ListCommandEventArgs クラス新しインスタンス初期化します。

名前空間: System.Web.UI.MobileControls
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文構文

Public Sub New ( _
    item As MobileListItem, _
    commandSource As Object, _
    originalArgs As CommandEventArgs _
)
Dim item As MobileListItem
Dim commandSource As Object
Dim originalArgs As CommandEventArgs

Dim instance As New ListCommandEventArgs(item,
 commandSource, originalArgs)
public ListCommandEventArgs (
    MobileListItem item,
    Object commandSource,
    CommandEventArgs originalArgs
)
public:
ListCommandEventArgs (
    MobileListItem^ item, 
    Object^ commandSource, 
    CommandEventArgs^ originalArgs
)
public ListCommandEventArgs (
    MobileListItem item, 
    Object commandSource, 
    CommandEventArgs originalArgs
)
public function ListCommandEventArgs (
    item : MobileListItem, 
    commandSource : Object, 
    originalArgs : CommandEventArgs
)

パラメータ

item

ListItem プロパティ初期化します。

commandSource

CommandSource プロパティ初期化します。

originalArgs

CommandEventArgs オブジェクトから継承された元の引数

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ListCommandEventArgs クラス
ListCommandEventArgs メンバ
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント
その他の技術情報
デザイナでの ASP.NET モバイル コントロール使用

ListCommandEventArgs フィールド


プロテクト フィールドプロテクト フィールド

  名前 説明
プロテクト フィールド DefaultCommand 既定コマンドの名前を設定します。値の取得も可能です。
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロール使用

ListCommandEventArgs プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ CommandArgument  コマンド引数取得します。 ( CommandEventArgs から継承されます。)
パブリック プロパティ CommandName  コマンド名を取得します。 ( CommandEventArgs から継承されます。)
パブリック プロパティ CommandSource イベントの発生元のコントロール返します
パブリック プロパティ ListItem イベント生成したリスト項目を返します
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロール使用

ListCommandEventArgs メソッド


ListCommandEventArgs メンバ

List コントロールの ItemCommand イベントデータ提供します

ListCommandEventArgs データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ListCommandEventArgs オーバーロードされます。 ListCommandEventArgs クラス新しインスタンス初期化します。
プロテクト フィールドプロテクト フィールド
  名前 説明
プロテクト フィールド DefaultCommand 既定コマンドの名前を設定します。値の取得も可能です。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ CommandArgument  コマンド引数取得します。(CommandEventArgs から継承されます。)
パブリック プロパティ CommandName  コマンド名を取得します。(CommandEventArgs から継承されます。)
パブリック プロパティ CommandSource イベントの発生元のコントロール返します
パブリック プロパティ ListItem イベント生成したリスト項目を返します
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロール使用



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ListCommandEventArgs」の関連用語

ListCommandEventArgsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ListCommandEventArgsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS