Display Different text

2 posts, 0 answers
  1. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 09 Sep 2014 Link to this post

    I would like to use an AutoCompleteBox to display records as the user enters the information however I need to display alternate text if the record is terminated.  There is the potential that a client name will be listed twice and I need some way of displaying them differently in the AutoCompleteBox.

    Normal record will display as such:

    Client Name - City, State

    What I need for a terminated Client to look like the following

    Client Name - City, State (Terminated Date)

    I am not sure of how to do this and am looking for some assistance.  Is there away to add an IF...Then statement to my DropDownItemTemplate?

    Thanks
  2. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 12 Sep 2014 Link to this post

    Hello Kurt,

    Such functionality could be achieved in a WebService binding scenario, where you could assign a custom attributes to the items, from the datasource. Thus, at the OnClientEntryAdding client-side event, you could set the custom text - Client Name - City, State. In addition, in the same event, you could check if there is already another item with the same text and determine weather to set the Client Name - City, State (Terminated Date) text template.
    Bellow you could find a sample project, which I had created for you, demonstrating a possible implementation.


    Regards,
    Nencho
    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