This is a migrated thread and some comments may be shown as answers.

Pulling Template Column Data Server Side

1 Answer 28 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Henry Derstine
Top achievements
Rank 1
Henry Derstine asked on 23 Jan 2015, 06:45 PM
I was trying to access data from AutoCompleteBox from the Private Sub RadAutoCompleteBox1_TextChanged(sender As Object, e As AutoCompleteTextEventArgs) Handles RadAutoCompleteBox1.TextChanged event.
I can get the text but I can't seem to get the DataValueField or any of the Data stored in the template fields (i.e., <%# DataBinder.Eval(Container.DataItem, "EMPTIN")%>)


RadAutoCompleteBox1.DataTextField = "ComboName"
RadAutoCompleteBox1.DataValueField = "EmployerIdnt"

<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400px" DropDownWidth="400px" EmptyMessage="Enter TIN or Name" TextSettings-SelectionMode="Single" inputtype="Text" >

<DropDownItemTemplate>

<table cellpadding="0" cellspacing="0">
<tr>
<td style="width: 25%">
Name:
</td>
<td style="width: 75%">
<%# DataBinder.Eval(Container.DataItem, "EMPNAME")%>
</td>
</tr>
<tr>
<td>
TIN:
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "EMPTIN")%>
</td>
</tr>
<tr>
<td>
City:
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "EMPCITY")%>
</td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
</table>
</DropDownItemTemplate>

</telerik:RadAutoCompleteBox>

Thanks for any help
Henry

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 28 Jan 2015, 12:41 PM
Hello Henry,

When the RadAutoCompleteBox InputType is set to "Text" you are only able to access the text within the input field. Any data stored in the DropDownItemTemplate fields could not be accessed.

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AutoCompleteBox
Asked by
Henry Derstine
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or