'宣言 Public ReadOnly Property CheckedItems As UltraListViewCheckedItemsCollection
public UltraListViewCheckedItemsCollection CheckedItems {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinListView Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder() sb.Append("A report will be generated for the following orders:") sb.Append(Environment.NewLine) Dim checkedItem As UltraListViewItem For Each checkedItem In Me.ultraListView1.CheckedItems sb.Append(checkedItem.Text) sb.Append(Environment.NewLine) Next MessageBox.Show(sb.ToString(), "Orders", MessageBoxButtons.OK, MessageBoxIcon.Information)
using Infragistics.Win; using Infragistics.Win.UltraWinListView; using System.Diagnostics; System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append( "A report will be generated for the following orders:" ); sb.Append( Environment.NewLine ); foreach( UltraListViewItem checkedItem in this.ultraListView1.CheckedItems ) { sb.Append( checkedItem.Text ); sb.Append( Environment.NewLine ); } MessageBox.Show( sb.ToString(), "Orders", MessageBoxButtons.OK, MessageBoxIcon.Information );