Share via


ColumnTemplate Remarks

  Microsoft Speech Technologies Homepage

The ColumnTemplate control is used exclusively in the Columns property of the DataTableNavigator control. The Columns property is a collection of ColumnTemplate controls.

The Name property of each ColumnTemplate control associates it with one of the columns in the DataTableNavigator control's data table. Each ColumnTemplate control contains a ContentTemplate object which contains prompt text and data binding expressions from any data column in the current data row. When the user speaks the name of a data column associated with a ColumnTemplate control, data from the current data row is bound into the ContentTemplate and the resulting text is played as a prompt.

When the Speech Platform plays the prompt, it attempts to use recorded text from a PromptDatabase, and synthesizes the text if recorded text is not found.

Data binding expressions in ContentTemplate objects that are contained in ColumnTemplate controls must be HTML-encoded.

Markup

<DataTableNavigator>
  ...
  <Columns>

    <speech:ColumnTemplate Name="..." runat="server">

      <ContentTemplate>
        ...Template Content...
        &lt;%# DataBinder.Eval(Container.DataItem, "...")%&gt;
        ...Template Content...
      </ContentTemplate>

    </speech:ColumnTemplate>

    <speech:ColumnTemplate Name="..." runat="server">
      ...
    </speech:ColumnTemplate>
    ...

  </Columns>
  ...
</DataTableNavigator>

See Also

ColumnTemplate Class | ColumnTemplate Constructor | ColumnTemplate Members | ColumnTemplate Properties | ColumnTemplate Methods | ColumnTemplate Events