Partilhar via


Columns Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the collection of templates that are used by the control. Read/write.

Usage

ASP.NET markup: <speech:DataTableNavigator Columns="..." />
Get value: TemplateCollection = DataTableNavigator.Columns;
Set value: DataTableNavigator.Columns = TemplateCollection;
Data type: TemplateCollection
Required: No

Remarks

Columns is a collection of ColumnTemplate objects, each of which corresponds to a column in the data table. Each ColumnTemplate object allows customization of the prompt that is played when the user requests the data from that column.

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.

Example

The following code example is taken from the DataTableNavigator Example. When the user navigates to the desired data row and says "maximum" or "minimum", the control will bind the data from the "High" or "Low" column into the "High" or "Low" ColumnTemplate text and play the resulting prompt.

<speech:DataTableNavigator 
  id="Navigator1" 
  runat="server" 
  InitialTimeout="3000" MaxTimeout="30000" ShortInitialTimeout="500"
  AccessMode="Select"
  DataSource="<%# dataSet11 %>" 
  DataMember="CityInfo" 
  DataHeaderFields="ville,CityNickname,état" 
  DataContentFields="maximum,minimum,conditions,divertissement" 
  DataTextField="CityNickname"
  DataBindField="State"
  QuestionPrompt="prochaine commande s'il-vous-plaît" 
  PromptSelectFunction="promptSelectFunction" 
  SemanticItem="siDataTableNavigator">

  <Columns>
    <speech:ColumnTemplate Name="High">
      <ContentTemplate>
        aujourd'hui dans &lt;%# DataBinder.Eval(Container.DataItem, "City")%&gt;
        un maximum de &lt;%# DataBinder.Eval(Container.DataItem, "High")%&gt;
        degrés.
      </ContentTemplate>
    </speech:ColumnTemplate>
    <speech:ColumnTemplate Name="Low" runat="server">
      <ContentTemplate>
        aujourd'hui dans &lt;%# DataBinder.Eval(Container.DataItem, "City")%&gt;
        un minimum de &lt;%# DataBinder.Eval(Container.DataItem, "Low")%&gt;
        degrés.
      </ContentTemplate>
  </Columns>

  <CommandRules>
    <speech:CommandRule Type="First"></speech:CommandRule>
    <speech:CommandRule Type="Last"></speech:CommandRule>
    <speech:CommandRule Type="Exit"></speech:CommandRule>
    <speech:CommandRule Type="Next"></speech:CommandRule>
    <speech:CommandRule Type="Previous"></speech:CommandRule>
    <speech:CommandRule Type="Select" Active="False"></speech:CommandRule>
    <speech:CommandRule Type="Header" Active="False"></speech:CommandRule>
    <speech:CommandRule Type="Read"></speech:CommandRule>
  </CommandRules>
</speech:DataTableNavigator>

See Also

DataTableNavigator Class | DataTableNavigator Constructor | DataTableNavigator Members | DataTableNavigator Properties | DataTableNavigator Methods | DataTableNavigator Events | DataTableNavigator Remarks | DataTableNavigator Client Object