Usage of AutoCompleteBoxEntry.DataItem

2 posts, 0 answers
  1. Zhanna Gultaeva
    Zhanna Gultaeva avatar
    33 posts
    Member since:
    Jan 2009

    Posted 24 Sep 2012 Link to this post


    AutoCompleteBoxEntry allows to store only two meaningful fields of data: DataTextField, DataValueField

    I try to store an object (with many other fields, beside DataTextField and DataValueField) for further processing in a corresponding AutoCompleteBoxEntry.DataItem (within RadAutoCompleteBox.EntryAdded event's code). But DataItem seems not to be stored anywhere (in ViewState?) along with the AutoCompleteBoxEntry instance, so I cannot access a particular AutoCompleteBoxEntry.DataItem later in Button's click event, for example.

    Which practice of storing full data object in DataItem would you advise?
  2. Kalina
    Kalina avatar
    918 posts

    Posted 27 Sep 2012 Link to this post

    Hi Vakhtang Barbakadze,

    The DataItem property is available only during databinding.
    You are not able to use it in a Button.Click event handler.

    Can you explain the scenario that you want to implement in more details?
    Thank you.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top