Friday, October 8, 2010

BindingSource In Easy Way

Encapsulates the data source for a form.

Used properties and event by the demo...

Basic Properties;

DataSouce :: Used to connect the collection that Implements IEnumerable interface.

MoveFirst :: Move the pointer to first record or item in collection.

MovePrevious :: Move the pointer to Previous record or item from the
selected in collection.

MoveNext :: Move the pointer to Previous record or item from the
selected in collection.

MoveLast :: Move the pointer to Last record or item in collection.

Basic Event;

CurrentChanged :: Event occur when each of the above property called.




Declare BindingSouce Class with WithEvents keyword because we want to work with its event like CurrentChanged that occur when ever the MoveNext, MovePrevious, MoveFirst, MoveLast properties called. Without WithEvents keyword we can use the object's properties and methods but we will not be able to work with its events.




 




No comments:

Post a Comment