Data Binding in Depth DEV 419 Level 400 Eyal Vardi CEO Experts4D Microsoft VSTO MVP blog: www.eVardi.com.

Slides:



Advertisements
Similar presentations
VSTO Day ActionsPane e la gestione dei dati Gianluca Ciocci
Advertisements

Organizing List and Documents with Site Columns and Content Types Gayan Peiris Principal Consultant
Internetteknologi (ITNET2) Presentation 21: ASP.NET Advanced.
Chapter 18 - Data sources and datasets 1 Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
BI All the way Part II - Analysis Services Gal Gubesi CEO, Microsoft Regional Director for BI
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Mike Henderlight Title: Program Manager.
C# Programming: From Problem Analysis to Program Design1 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
Visual Basic 2005 and Windows Forms 2.0 Enhancements Tyler Whitney Microsoft, Corp.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
131 Agenda Overview Review Roles Lists Libraries Columns.
Classes and Class Libraries Examples and Hints November 9,
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Chapter 11 Introduction to Database Processing. Class 11: Database Processing Use a Visual Studio Wizard to establish a database connection used to load.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
CST238 Week 7 Questions / Concerns? Announcements – HW#2 due today (project concept/preliminary design) – Check-off Take Home lab#6 Friday is the last.
Using the Actions Pane, Host Controls, and Smart Tags
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
DEV397 Windows Forms Databinding Mike Henderlight Program Manager Windows Forms Microsoft Corporation.
Data Binding to Controls Programming in C# Data Binding to Controls CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis.
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
Neal Stublen Populating a Database  SQLExpress should be installed with Visual Studio  The book provides a.sql file for populating.
Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.
V 1.0 Programming III. Automatic notifications (…Changed, INofityPropertyChanged, ObservableCollection ) Data formatters Data conversions Resources.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Data Binding in ASP.NET.
DEV305 Presenting Data with the ASP.NET DataGrid Control Ken Getz Senior Consultant MCW Technologies, LLC.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Binding Basics.
Server Control Tips & Tricks Presented by: Patrick Hynds Microsoft Regional Director CriticalSites CTO MCSD, MCSE+I, MCDBA, MCSA, MCP+Site Builder, MCT.
ADO.NET Part 2. Slide 2 Overview Slide 3 Introduction to the DataGridView Control It’s a two-dimensional grid containing rows and columns Its use in.
Module 4: Building DataSets. Overview Working in a Disconnected Environment Building DataSets and DataTables Binding and Saving a DataSet Defining Data.
Data Binding with Tabular Data Control. Objective To understand Dynamic HTML data binding. To be able to sort and filter data directly on the client without.
C# Programming: From Problem Analysis to Program Design1 10 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
1 Chapter 20 – Data sources and datasets Outline How to create a data source How to use a data source How to use Query Builder to build a simple query.
Observer design pattern A closer look at INotifyPropertyChanged, INotifyPropertyChanging and ObservableCollection Observer design pattern1.
Microsoft Office Excel 2007: Programming Business Intelligence Features John Hooper Service Line Architect Microsoft Corporation Jed Farr Senior Consultant.
Making the Most of WinForms 2.0 Data Binding Rajiv Sodhi Microsoft India.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
DEV401 Developing ASP.NET Server Controls - Part II: Adv Topics Tony Goodhew Product Manager Microsoft Corp.
ControlTemplate and DataTemplate Doncho Minkov Telerik School Academy Technical Trainer
DataBinding. Objectives List and explain the types of binding. Explain Binding Context and CurrencyManager class. List and explain the properties and.
DEV393.NET Windows Forms Tips and Tricks Ken Getz Senior Consultant MCW Technologies, LLC.
PROGRAMMING IN C#. Collection Classes (C# Programming Guide) The.NET Framework provides specialized classes for data storage and retrieval. These classes.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code.
WPF Data Binding Tomer Shamam Smart Client Team Leader Sela Group
Windows Forms A new plattform for Windows-based application development.
Understand How to Create New Controls and Extend Existing Controls Windows Development Fundamentals LESSON 2.3A.
Iterations (aka Loops). 2 Loops Loops (iterations) are segments of code that may be executed several times. Fixed-count (definite) loops repeat a fixed.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
Module 5 Data Classes DataView – DataGridView Control 1.
Understand Databound Controls Windows Development Fundamentals LESSON 4.2A.
Soyatec Contents Needs Architecture XAML fundamentals Data Binding Advanced features Style Q&A.
Programming with MVVM Miguel A. Castro Architect -
Automation Build TFS 2010 Trainer: Eran Ruso. Training Agenda Team System Introduction SCM – Classic – Feature Crus Team Build 2010.
Lecture 8: Collections, Comparisons and Conversions. Svetla Boytcheva AUBG, Spring COS 240 Object-Oriented Languages.
Data Binding, Binding Properties Doncho Minkov Telerik School Academy Technical Trainer
Using Data in Microsoft Visual Studio 2005 Tools for the Microsoft Office System Mike Hernandez Product Manager Visual Studio Tools for Office.
Windows Communication Foundation and Web Services
Integrating Data Lesson 6.
User experience Framework
Creative Databinding With Delphi 8 for .NET
Avalon – Using Data In Your Applications
VB.NET Using Database.
12/1/2018 1:01 PM P4032 System Performance Is a Feature – Understanding System Health Through Telemetry - a continuation of Real-time sentiment built on.
DEV312 基于WPF的数据绑定.
Build data-driven collection and list apps using ListView in HTML5
Графическое проектирование структуры базы данных.
Windows Forms in Visual Studio 2005: An in-depth look at key features
Presentation transcript:

Data Binding in Depth DEV 419 Level 400 Eyal Vardi CEO Experts4D Microsoft VSTO MVP blog:

Agenda Data Binding Overview BindingSource Class Data Source & Interfaces Binding Class Improvement

Application Architecture Binding

What Can we Bind? One Way Two Way.NET Controls Simple Binding.NET Controls Complex Binding Data Consumers Data Providers Object ArrayList DataSet Custom Collection Config File You can only bind to the public properties

SimpleBinding Label, TextBox, PictureBox, DateTimePicker ComplexBinding DataGrid, ComboBox, ListBox

Data Binding Goals Run-Time: Binding Data to Controls Synchronize the data between the controls Formatting and Parsing the data Filter, Sort and Search the data Design-Time: Simple and fast to implement

Data Templates Data Template class Address { string Address {get;set} string Address {get;set} string City {get;set} string City {get;set} string COuntry {get;set} string COuntry {get;set} string PostalCode {get;set} string PostalCode {get;set}} User Control

Customize Data Source Win Need to implement one of the following data binding attributes: DefaultBindingPropertyAttribute ComplexBindingPropertiesAttribute LookupBindingPropertiesAttribute

Data Template

Binding Source

The Binding Flow BindingSource DataSet DataTable DataSource DataMember Simple Control Complex Control Column DataBinding Property DataSource BindingSource * Don’t forget to add default constructor

Closer look on BindingSource Control BindingSource Simple Binding Complex Binding CurrencyManager Control Data Source Binding Binding BindingContexBindingContex

BindingSource Class (Binding Contex)

BindingSource.DataSource = Array=> No Add & Remove List<> => Add & Remove TypOf => Add & Remove new Object()=> Add & Remove *BindingList<> => Add & Remove DataView => Add, Remove, Sort, Search, Filter * Dervied Class can Support: Sort, Search and Filter ?

BindingSource Class (Sort, Find & Filter)

Data Source & Interfaces

IEnumerable ICollection IList IBindingList.NET 1.x Interfaces

.NET 2.0 New Interface

Build Custom Data Source 1.Interfaces should be implemented in your custom collection IBindingListView Sort Sort Advanced Sort Advanced Sort Filter Filter Search Search

Recipe… 1)Inherit BindingList<> 2)Add sort and search capability 3)Implement IBindingListView for getting advance sort and filter capability

.NET 1.x Interfaces

BindingListView<T>

Build Custom Data Source 2.Interfaces should be implemented in your custom type INotifyPropertyChangedIEditableObjectIDataErrorInfo

INotifyPropertyChanged INotifyPropertyChanged IEditableObject IEditableObject IDataErrorInfo IDataErrorInfo

New Feature in Binding Class Update mode Formatting data Null Value Error notification

New Feature in Binding Class

Custom Formatting & Parsing We use the Binding class events: Format, raised when data is pushed from the data source into the control Parse, raised when data is pushed from the control into the data source ControlDataSource Parse Event Format Event Binding

Type Conversion Custom data type to string, can be done: Custom data type to string, can be done: Override the ToString() Override the ToString() Use the Binding Format event Use the Binding Format event Write custom class for conversion Write custom class for conversion String to custom data type, can be done: String to custom data type, can be done: Use the Binding Parse event Use the Binding Parse event Write custom class for conversion Write custom class for conversion

Custom Formatting & Type Converter

DataSet Can’t Solve All your Problems

Books

New York! איך ממלאים משוב? ב - בסוף כל יום ב -Beat Center מה מקבלים? חולצת Feel The Beat השתתפות בהגרלת כרטיסי טיסה מכשירי i-mate ועוד... (לממלאים משוב לכל יום) DEV419

Your potential. Our passion. TM