450 likes | 721 Views
Chapter 16 - Dynamic HTML: Data Binding with Tabular Data Control. Outline 16.1 Introduction 16.2 Simple Data Binding 16.3 Moving within a Recordset 16.4 Binding to an img 16.5 Binding to a table 16.6 Sorting table Data 16.7 Advanced Sorting and Filtering
E N D
Chapter 16 - Dynamic HTML: Data Binding with Tabular Data Control Outline 16.1 Introduction 16.2 Simple Data Binding 16.3 Moving within a Recordset 16.4 Binding to an img 16.5 Binding to a table 16.6 Sorting table Data 16.7 Advanced Sorting and Filtering 16.8 Data Binding Elements 16.9 Web Resources
Objectives • In this lesson, you will learn: • To understand Dynamic HTML’s notion of data binding and how to bind data to XHTML elements. • To be able to sort and filter data directly on the client without involving the server. • To be able to bind a table and other XHTML elements to data source objects (DSOs). • To be able to filter data to select only records appropriate for a particular application. • To be able to navigate backward and forward through a database with the Move methods.
16.1 Introduction • Data binding • Data no longer reside exclusively on the server • Data can be maintained on the client • Eliminate server activity and network delays • Data Source Objects (DSOs) • Tabular Data Control (TDC)
16.2 Simple Data Binding • Data file • Header row • Specifies the names of the columns below • Text qualifiers ( @ ) • Enclose data in each field • Field delimiter ( | ) • Separate each field • Recordset
16.3 Moving within a Recordset • Moving through a recordset using JavaScript (Fig. 16.3)
16.4 Binding to an img • Many different types of XHTML elements can be bound to data sources • Binding to an img element • Changing the recordset updates the src attribute of the image
16.5 Binding to a table • Binding data to a table is perhaps the most important of data binding • Different from the data binding we’ve seen
16.6 Sorting table Data • Manipulate a large data source • Need to sort data • Can be accomplished by the Sort property of the TDC
16.7 Advanced Sorting and Filtering • Filtering • Selecting data that meets a specific criteria • Combined with TDC provides powerful data rendering
16.8 Data Binding Elements • Exactly how a data source is displayed by the browser depends on the XHTML element to which the data is bound • Different elements may use the data for different purposes.