Pulling Template Column Data Server Side

2 posts, 0 answers
  1. Henry Derstine
    Henry Derstine avatar
    109 posts
    Member since:
    Dec 2005

    Posted 23 Jan 2015 Link to this post

    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" >


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


    Thanks for any help
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1968 posts

    Posted 28 Jan 2015 Link to this post

    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.

    Boyan Dimitrov

    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.

Back to Top