Infragistics2.Win.UltraWinListView.v8.1
CheckState Property
See Also  Example
Infragistics.Win.UltraWinListView Namespace > UltraListViewItem Class : CheckState Property

Gets/sets whether this UltraListViewItem is checked, unchecked, or indeterminate.

Syntax

Visual Basic (Declaration) 
Public Property CheckState As CheckState
C# 
public CheckState CheckState {get; set;}

Remarks

The CheckState property is only applicable when the UltraListView control's UltraListView.View property is set to 'Details' or 'List'.

When the CheckState property is set directly, a property change notification is issued; when an application needs to set the property on a large number of items, this can adversely affect performance. The UltraListViewCheckedItemsCollection.SetCheckState method can be used to set the CheckState property on multiple items while only issuing one property change notification.

Example

The followingcode sample demonstrates how to disable the hot tracking effects for a specific UltraListViewItem:

Visual BasicCopy Code
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinListView

    Private Sub ultraListView1_ItemCheckStateChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinListView.ItemCheckStateChangedEventArgs) Handles ultraListView1.ItemCheckStateChanged

        ' Disable the hot tracking effects for unchecked items
        If e.Item.CheckState = CheckState.Unchecked Then
            e.Item.HotTracking = DefaultableBoolean.False
        Else
            e.Item.HotTracking = DefaultableBoolean.True
        End If

    End Sub

C#Copy Code
using Infragistics.Win;
using Infragistics.Win.UltraWinListView;
using System.Diagnostics;


       
private void ultraListView1_ItemCheckStateChanged(object sender, Infragistics.Win.UltraWinListView.ItemCheckStateChangedEventArgs e)
       {
           
//    Disable the hot tracking effects for unchecked items
           
if ( e.Item.CheckState == CheckState.Unchecked )
               e.Item.HotTracking = DefaultableBoolean.False;
           
else
               
e.Item.HotTracking = DefaultableBoolean.True;
       }

See Also