We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Context Choice Item

Thread ID:





99743 Jun 8,2011 02:46 PM UTC Jun 14,2011 05:19 AM UTC WinForms 3
Tags: EditControl
Ravinder Merugu-
Asked On June 8, 2011 02:46 PM UTC

Is there any way to add some meta data to context choice items?

Vallarasu S [Syncfusion]
Replied On 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.

Vallaraus S.

Ravinder Merugu-
Replied On 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.

Vallarasu S [Syncfusion]
Replied On 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

Vallarasu S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon