About DataWindow objects, DataWindowControls, WebDataWindowControls, and DataStores

The patented Sybase DataWindow technology provides powerful data retrieval, manipulation, presentation, and update capabilities for client/server, multitier, and thin-client Web-based applications. DataWindow .NET lets you take advantage of the rich interface and ease-of-use of the DataWindow in the .NET environment.

DataWindow objects

A DataWindow object is an object you use to retrieve, present, and manipulate data from a relational database or other data source (such as an Excel worksheet or a text file). A DataWindow object defines the source of the data and its display characteristics.

You design the DataWindow object in DataWindow Designer (or in the Sybase PowerBuilder or InfoMaker products), where you specify display formats, presentation styles, validation rules, and other data properties. You can also add nested reports, computed columns, pictures, buttons, and other enhancements to the DataWindow object.

The DataWindow Designer User’s Guide describes the predefined presentation styles you can use to create a DataWindow object, as well as all the ways you can enhance it so the data can be viewed and used in the most meaningful way.

The following illustration shows a .NET Windows form with a grid-style DataWindow object at the top, sharing data with three graph-style DataWindow objects at the bottom:

The sample shows pie, bar, and offset graphs under a grid datawindow with the same result set.

DataWindow controls and DataStores

DataWindowControls and WebDataWindowControls are visual containers for the DataWindow object, and a DataStore object is a nonvisual container. DataWindowControls are used in .NET Windows applications, and WebDataWindowControls are used in Web applications. You use drag-and-drop or write code to add a control or DataStore to your forms, then associate a DataWindow object with the container and code the methods and events of the container to manipulate the DataWindow object.

Basic process

Using a DataWindowControl, WebDataWindowControl, or DataStore in Visual Studio .NET 2005 involves these main steps:

  1. In DataWindow Designer, create a project to hold your DataWindow objects, then use the DataWindow wizard to create a DataWindow object.

    In the wizard, you define the data source, presentation style, and some display properties of the object.

  2. Use the DataWindow painter to design the DataWindow object.

    In the painter, you define other properties of the object, such as display formats, validation rules, and sorting and filtering criteria.

  3. Save the DataWindow object in a library (PBL) file.

  4. In a Visual Basic or C# Windows application project, drag the DataWindowControl or DataStore icon from the Toolbox to the form. In an ASP.NET Web Site project, drag the WebDataWindowControl or DataStore icon from the Toolbox to the form.The following illustration shows a DataWindowControl.

    The sample shows the toolbox and the DataWindowControl image before a DataWindow is associated with it.
  5. In the Properties window for the control or DataStore, specify the name of the DataWindow object and the library where it resides.

  6. Add code to retrieve, modify, and update the data in the DataWindow object.

These steps are described in more detail in Chapter 2, “Tutorial.” The process is similar in other .NET development environments, where you need to use the appropriate mechanism for the environment to create an instance of the control or DataStore on a form.

The rest of this chapter provides an overview of DataWindow .NET.