DataBindField Property for French (Canada)
Gets or sets the field of the DataSource property that provides the binding values of the table items. Read/write.
Usage
ASP.NET markup: | <speech:DataTableNavigator DataBindField="..." /> |
Get value: | String = DataTableNavigator.DataBindField; |
Set value: | DataTableNavigator.DataBindField = String; |
Data type: | String |
Required: | No |
Remarks
If the DataBindField property is not specified, the control binds the index of the row to its SemanticItem property.
Example
The following code example is adapted from the DataTableNavigator Example. The AccessMode property setting of Fetch specifies that, when the user says the nickname of a city, the control will navigate to the row for that city and then exit. The DataBindField property specifies the State column. When the control exits, it will place the data from the State field of the selected row in the control's SemanticItem.
<form id="Form1" method="post" runat="server">
...
<speech:DataTableNavigator
id="Navigator1"
runat="server"
InitialTimeout="3000" MaxTimeout="30000" ShortInitialTimeout="500"
AccessMode="Fetch"
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">
<HeaderTemplate>
le temps maintenant dans
<%# DataBinder.Eval(Container.DataItem, "City")%>,
<%# DataBinder.Eval(Container.DataItem, "State")%>
</HeaderTemplate>
<ContentTemplate>
aujourd'hui dans <%# DataBinder.Eval(Container.DataItem, "City")%>
<%# DataBinder.Eval(Container.DataItem, "Conditions")%>,
avec un maximum de <%# DataBinder.Eval(Container.DataItem, "High")%>
et un minimum de <%# DataBinder.Eval(Container.DataItem, "Low")%>
degrés.
</ContentTemplate>
<CommandRules>
<speech:CommandRule Type="Exit"></speech:CommandRule>
<speech:CommandRule Type="Next"></speech:CommandRule>
<speech:CommandRule Type="Previous"></speech:CommandRule>
<speech:CommandRule Type="Read"></speech:CommandRule>
</CommandRules>
</speech:DataTableNavigator>
...
</form>
See Also
DataTableNavigator Class | DataTableNavigator Constructor | DataTableNavigator Members | DataTableNavigator Properties | DataTableNavigator Methods | DataTableNavigator Events | DataTableNavigator Remarks | DataTableNavigator Client Object