Paging Through a Data Table - PowerPoint PPT Presentation

About This Presentation
Title:

Paging Through a Data Table

Description:

From the Application category of the Insert bar, choose Dynamic Data Dynamic Table: ... Navigation Bar ... the Recordset Navigation Bar dialog appears, choose ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 15
Provided by: FredTHof
Learn more at: http://www1.udel.edu
Category:
Tags: data | paging | table | through

less

Transcript and Presenter's Notes

Title: Paging Through a Data Table


1
Paging Through a Data Table
  • Creating a Navigation Bar Using theRecordset
    Navigation BarServer Behavior

2
Paging Through a Data Table
  • When a data table contains too many records to
    display onscreen at once, you need a way to page
    through the data.
  • To help you do this, Dreamweaver has an
    Application object called the Recordset
    Navigation Bar server behavior.
  • The following tutorial steps you through the
    process of creating a Recordset Navigation Bar
    that the user can use to page through a data
    table onscreen.

3
Create an ASP Page
  • Pull down the File menu and choose New to bring
    up the New Document dialog.
  • Select the Dynamic Page category to make the
    Dynamic Page options appear.
  • Select ASP JavaScript and click the Create
    button the new page appears.
  • Pull down the File menu, choose Save, and save
    the file in your sites local root folder in
    this example, make the name of the page be
    DataTablePaging.asp.

4
Defining the Data Source
  • If you have not already defined the data source
    containing your table, follow these steps
  • Click to position your cursor in the Databases
    window. If the Databases window is not visible,
    pull down the Window menu and choose Databases.
  • Click the plus-sign button and choose Custom
    Connection String.
  • When the Custom Connection String dialog appears,
    enter the name of the connection and your
    connection string.

5
Entering the Connection String
  • In this course, the connection string
    is"DBQC\webs.oet.udel.edu\fthstudents\databa
    ses\lastname\TopSecret.mdbDRIVERMicrosoft
    Access Driver (.mdb)
  • -or-
  • "ProviderMicrosoft.Jet.OLEDB.4.0Data
    SourceC\webs.oet.udel.edu\fthstudents\databases
    \lastname\TopSecret.mdb
  • If you are running your own Web server, you can
    use the my.udl wizard to create the connection
    string.

6
Create a Recordset Data Binding
  • Click the Bindings tab of the Application window,
    or pull down the Window menu and choose Bindings.
  • Click the plus sign button and choose recordset
    to make the recordset dialog appear.
  • Customize the Name field to suit your
    application. If this is a list of users, for
    example, make the Name field say UsersRecordset.
  • Choose the connection that contains the table.
  • Select the data table containing your data.
  • Select the data fields you want displayed.
  • Click OK.

7
Select the Application Toolbar
  • If the Insert toolbar is not already set to
    Application, pull down the Insert bar and choose
    Application to make the Application toolbar
    appear

8
Display the Data Table
  • Click to position the cursor at the spot on the
    page where you want to display the data table.
  • From the Application category of the Insert bar,
    choose Dynamic Data?Dynamic Table

9
Define the Dynamic Table
  • When the Dynamic Table dialog appears, choose the
    recordset you want to display, set the number of
    records to show at a time, and click OK

10
Test the Page
  • Press F12 to test the page and make sure it works
    so far. F12 publishes and tests the page all in
    one step.
  • When the page appears in your browser, you should
    see the table onscreen.
  • If you do not see the table, troubleshoot the
    problem until you get this test to succeed.

11
Insert the Recordset Navigation Bar
  • Click to position the cursor at the spot on the
    page where you want to display the navigation
    bar.
  • Pull down the Recordset Paging menu and choose
    Recordset Navigation Bar

12
Set the Recordset Navigation Bar Options
  • When the Recordset Navigation Bar dialog appears,
    choose the recordset you want to display, and set
    the option to display the navigation options as
    text or images, as you wish, and click OK

13
Test the Page
  • Press F12 to test the page. You should now have
    buttons you can use to page back and forth
    through the data table

14
Adjust the Page Layout
  • Stylize the page elements as you wish.
  • Use a surrounding table, for example, to make the
    navigation bar and the table appear centered with
    respect to each other as follows
Write a Comment
User Comments (0)
About PowerShow.com