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

Usage of AutoCompleteBoxEntry.DataItem

1 Answer 83 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 24 Sep 2012, 09:44 AM
Hello!

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?

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 27 Sep 2012, 01:54 PM
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,
Kalina
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.
Tags
AutoCompleteBox
Asked by
Ron
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or