Infragistics(R) NetAdvantage(R) Windows Forms
AfterCardsScrollEventArgs Class
Members  Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : AfterCardsScrollEventArgs Class

Event args for UltraGrid.AfterCardsScroll event.

Syntax

Visual Basic (Declaration) 
Public Class AfterCardsScrollEventArgs 
   Inherits System.EventArgs
C# 
public class AfterCardsScrollEventArgs : System.EventArgs 

Example

Following code demonstrates the AfterCardsScroll event.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Visual BasicCopy Code
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
C#Copy Code
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 );
		}

See Also