DataTableNavigator.Columns Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Gets or sets the collection of templates that are used by the control. Read/write.
Namespace: Microsoft.Speech.Web.UI
Assembly: Microsoft.Speech.Web (in microsoft.speech.web.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property Columns As TemplateSet
[BrowsableAttribute(false)]
public TemplateSet Columns { get; set; }
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 Speech Server 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 "High" or "Low," the control binds 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="{OPEN_ASP_TAG}# dataSet11 {CLOSE_ASP_TAG}"
DataMember="CityInfo"
DataHeaderFields="City,CityNickname,State"
DataContentFields="High,Low,Conditions,Entertainment"
DataTextField="CityNickname"
DataBindField="State"
QuestionPrompt="next command please"
PromptSelectFunction="promptSelectFunction"
SemanticItem="siDataTableNavigator">
<Columns>
<speech:ColumnTemplate Name="High">
<ContentTemplate>
Today's high in {OPEN_ASP_TAG}# DataBinder.Eval(Container.DataItem, "City"){CLOSE_ASP_TAG}
is {OPEN_ASP_TAG}# DataBinder.Eval(Container.DataItem, "High"){CLOSE_ASP_TAG}.
</ContentTemplate>
</speech:ColumnTemplate>
<speech:ColumnTemplate Name="Low">
<ContentTemplate>
Today's low in {OPEN_ASP_TAG}# DataBinder.Eval(Container.DataItem, "City"){CLOSE_ASP_TAG}
is {OPEN_ASP_TAG}# DataBinder.Eval(Container.DataItem, "Low"){CLOSE_ASP_TAG}.
</ContentTemplate>
</speech:ColumnTemplate>
</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>
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
Windows Server 2003
See Also
Reference
DataTableNavigator Class
DataTableNavigator Members
Microsoft.Speech.Web.UI Namespace