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

    <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
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 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.

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top