ResetItem Method

BindingSource.ResetItem Method (Int32)


Causes a control bound to the BindingSource to reread the item at the specified index, and refresh its displayed value.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member ResetItem : 
        itemIndex:int -> unit


Type: System.Int32

The zero-based index of the item that has changed.

The ResetItem method notifies all controls bound to the item at the specified Position to refresh their values. The method does this by raising the ListChanged event with ListChangedEventArgs.ListChangedType set to ListChangedType.ItemChanged.

ResetItem is automatically called whenever changes are made to the value of an individual item. However, the programmer can also call this method explicitly.

The following code example uses a BindingSource component to bind a list to a DataGridView control. The list does not raise change notifications, so the ResetItem method on the BindingSource is used to raise the ListChanged event. This code example is part of a larger example provided in How to: Raise Change Notifications Using the BindingSource ResetItem Method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft