'宣言 Public Delegate Sub AfterCardsScrollEventHandler( _ ByVal sender As Object, _ ByVal e As AfterCardsScrollEventArgs _ )
public delegate void AfterCardsScrollEventHandler( object sender, AfterCardsScrollEventArgs e )
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout ' Turn on the card-view functionality. Me.UltraGrid1.DisplayLayout.Bands(0).CardView = True End Sub Private Sub UltraGrid1_AfterCardsScroll(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.AfterCardsScrollEventArgs) Handles UltraGrid1.AfterCardsScroll ' FirstVisibleCardRow property indicates the first visible card in the card area ' associated with the rows collection. Dim firstCard As UltraGridRow = Me.UltraGrid1.Rows.FirstVisibleCardRow ' Print out the visible index of the card row. Debug.WriteLine("First Card Visible Index = " & firstCard.VisibleIndex) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { // Turn on the card-view functionality. this.ultraGrid1.DisplayLayout.Bands[0].CardView = true; } private void ultraGrid1_AfterCardsScroll(object sender, Infragistics.Win.UltraWinGrid.AfterCardsScrollEventArgs e) { // FirstVisibleCardRow property indicates the first visible card in the card area // associated with the rows collection. UltraGridRow firstCard = this.ultraGrid1.Rows.FirstVisibleCardRow; // Print out the visible index of the card row. Debug.WriteLine( "First Card Visible Index = " + firstCard.VisibleIndex ); }