DataRepeater.ItemCount プロパティ
取得または設定の数DataRepeaterItem内にある項目、DataRepeaterコントロールです。
名前空間: Microsoft.VisualBasic.PowerPacks
アセンブリ: Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)
構文
'宣言
<BrowsableAttribute(False)> _
Public Property ItemCount As Integer
[BrowsableAttribute(false)]
public int ItemCount { get; set; }
[BrowsableAttribute(false)]
public:
property int ItemCount {
int get ();
void set (int value);
}
[<BrowsableAttribute(false)>]
member ItemCount : int with get, set
function get ItemCount () : int
function set ItemCount (value : int)
プロパティ値
型 : Int32
カウント。
解説
このプロパティ内の項目の数を指定する設定、DataRepeaterときにコントロール、VirtualModeプロパティに設定されてTrueです。
ときに、DataRepeaterにバインドされた、 DataSource、この値はで表示される値と同じ、 BindingNavigatorCountItemのラベル、BindingNavigatorです。
例
次のコード例の数を取得する方法を示していますDataRepeaterItem項目をDataRepeaterコントロールです。 含む形式であることを前提としています、DataRepeaterという名前のコントロールDataRepeater1とButtonという名前のButton1です。
Private Sub Button1_Click() Handles Button1.Click
MsgBox("The DataRepeater contains " &
CStr(DataRepeater1.ItemCount) & " items.")
End Sub
private void button1_Click(System.Object sender, System.EventArgs e)
{
string stringCount;
stringCount = dataRepeater1.ItemCount.ToString();
MessageBox.Show("The DataRepeater contains " + stringCount + " items.");
}
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。
参照
関連項目
Microsoft.VisualBasic.PowerPacks 名前空間