Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The DataBindingProperties object controls how data is bound when the BindData method is called. DataBindingProperties can control the max rows of data per slide, the max total rows of data, and the slide to which the data is bound.

...

Name

...

Description

...

MaxRowsPerSlide

...

MaxRowsToImport

...

Slide

...

Syntax

Basic Syntax

The BindData method requires a DataBindingProperties object as a parameter. Use the following line of code to create a new DataBindingProperties object.

Code Block

DataBindingProperties dataProps = pptt.CreateDataBindingProperties();

MaxRowsPerSlide

MaxRowsPerSlide controls how many of rows of data should be imported onto each slide. When this property is set PowerPointWriter will stop importing data when the limit is reached. In order to import all the data in a data source to your presentation, MaxRowsPerSlide should be used with the Continue modifier. The default value is -1 which indicates that all the data in the data source should be imported to a single slide. For more information see Importing Multiple Rows of Data and Fitting Data on to Multiple Slides.

Code Block

//Setting MaxRowsPerSlide
dataProps.MaxRowsPerSlide = 5;

MaxRowsToImport

MaxRowsToImport determines how many total rows of data to import into a presentation. PowerPointWriter will stop importing data from the data source when this limit is reached. The default value is -1 which indicates that data will continue to be imported until the end of the data source is reached.

Code Block

//Setting MaxRowsToImport
dataProps.MaxRowstoImport = 10;

Slide

Slide controls which slide in a presentation a given data source should be imported into. This allows for data markers across the presentation to have the same name but import from different data sources. Slide can be set to the 0-based index of the slide you wish to import data to. The default value is -1 which indicates that the data is not scoped to a particular slide.

Code Block

dataProps.Slide = 2;