Gets the list for this CurrencyManager.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The object returned by the IList interface. This will be commonly used when you know the type of the underlying list. For example, if you are data-bound to a DataSet, the underlying list is a DataView (which implements IList). Other classes that implement the interface (this is not a complete list) include Array, ArrayList, and CollectionBase.property can be cast to any type that implements the
How you use the IList interface. For example, you can use the property to determine the name of the list. If the data source implements the ITypedList interface, you can use the GetListName method to return the name of the current table. This is shown in the C# code below:property depends on the class that implements the
The following code example allows users to edit a set of records, but not add any new ones. In the Navigate event of a DataGrid control, the IList returned by the property is cast to a DataView variable. The AllowNew property of the DataView is set to false.
Private Sub Grid_Navigate(sender As Object, e As NavigateEventArgs) If e.Forward Then Dim ds As DataSet = CType(grid.DataSource, DataSet) Dim cm As CurrencyManager = _ CType(BindingContext(ds,"Customers.CustOrders"), CurrencyManager) ' Cast the IList to a DataView to set the AllowNew property. Dim dv As DataView = CType(cm.List, DataView) dv.AllowNew = false End If End Sub
Available since 1.1