Creative Databinding With Delphi 8 for 'NET - PowerPoint PPT Presentation

About This Presentation
Title:

Creative Databinding With Delphi 8 for 'NET

Description:

The binding of a control to a class that supports a list ... The cheats way Currency Manager, refresh. IBindingList. Change Notification ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 11
Provided by: richp3
Category:

less

Transcript and Presenter's Notes

Title: Creative Databinding With Delphi 8 for 'NET


1
Creative DatabindingWith Delphi 8 for .NET
2
Databinding Overview
  • Simple Binding
  • The binding of a control to a public property of
    a class
  • Complex Binding
  • The binding of a control to a class that supports
    a list
  • Specifically the list object must support the
    IList interface.

3
Databinding Binding Managers
  • Currency Manager
  • Simple and Complex Binding
  • Uses Interfaces or reflection to bind
  • Property Manager
  • Simple Binding
  • Uses reflection to bind

4
Databinding
  • Dataflow

5
Sample Code
6
Databinding Collections
  • Must Implement IList
  • Most convenient to inherit from CollectionBase
  • Must implement a default Array property called
    Item
  • Member class properties must be published

7
Databinding Navigating the collection
  • CurrencyManager
  • Position, read and write, so can increment and
    decrement
  • Current, contains the selected object
  • Refresh, update the bound component.

8
Databinding Showing changes
  • The cheats way Currency Manager, refresh
  • IBindingList
  • Change Notification
  • Automatic Addition of Items
  • Automatic Removal of Items
  • In place Editing
  • Searching
  • Sort

9
Databinding Simple binding
  • 2 way, but there is a trick to it
  • Implement a propertynameChanged event
  • Binding class allows us to provide custom parsing
    and formatting.

10
Databinding Thanks to
  • References
  • http//www.codeproject.com/vb/net/databindingconce
    pts.asp
  • http//support.microsoft.com/default.aspx?scidkb
    EN-USQ313482
  • http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/dnadvnet/html/vbnet02252003.asp
Write a Comment
User Comments (0)
About PowerShow.com