VS
Vallarasu S
Syncfusion Team
June 9, 2011 06:19 AM UTC
Hi Ravider,
Thanks for your interest in Syncfusion prodcuts.
Can you please brief your requirement? Therefore I can provide a better solution possible.
Thanks,
Vallaraus S.
RM
Ravinder Merugu-
June 9, 2011 03:58 PM UTC
Thanks for your response.
We populate context choice item list from our Volabulary Term collection. I want to put Vocabulary Term object in Contect choice item Tag property. But ContextChoiceItem class was not exposed through API. Only way we can add context choice items is through Items.Add property on IContextChoiceController.
Is there any way I can attach our Vocabulary Term object to context choice item, so that I can get it when user selects an item from intellisense.
VS
Vallarasu S
Syncfusion Team
June 14, 2011 05:19 AM UTC
Hi Ravinder,
Thanks for the update.
Implementing the IContextChoiceItem, and adding an API of type object would be the solution, however adding an ContextChoiceItem to the ContextChoiceItemCollection is marked private, and cannot be accessed. Alternatively you can keep a hashtable to store the vocabulary terms with the IContextChoiceItem.ID as the key as follows.
Hashtable VocabularyTerm = new Hashtable();
void edit_ContextChoiceOpen(IContextChoiceController controller)
{
IContextChoiceItem item = controller.Items.Add("Item 1");
// You can get this value associated with the key later.
VocabularyTerm[item.ID] = "Associated Value";
}
Let me know if this helps
Regards
Vallarasu S.