BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Torsten,
Thank you for using Syncfusion products.
We hope your requirement is to add the items in EditControl context choice from other class. The items from other class can be added into context choice by handling the ContextChoiceOpen event as shown in the below code snippets. We have also prepared the sample for your reference and this will be available in the below location.
Code Snippets[C#]:
private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller) { foreach (object items in employ.Name) { controller.Items.Add(items.ToString()); } } |
Sample Location : https://www.syncfusion.com/downloads/support/forum/118630/Intellisense1385814257.zip
Could you please check with attached sample and let us know the provided solution is helpful? If we misunderstood your query please provide some additional details about your requirement. this will be helpful for us to analyze and provide you a prompt solution.
Please let us know if you need further assistance.
Regards,
Senthil.
Hi Torsten,
Thank you for your update.
We request you to confirm, if the reported requirement is to load intellisence items to EditControl, from external xml file. If so, please make use of below code snippet to achieve this requirement.
Code snippet[C#]:
// Context Choice Implementation private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller) { reader = new XmlTextReader(intellisensePath); while (reader.Read()) { string itemname = "", tooltip = ""; switch (reader.NodeType) { case (XmlNodeType.Element): if (reader.Name == "Items") { if (reader.AttributeCount > 0) { while (reader.MoveToNextAttribute()) { if (reader.Name == "Name") { itemname = reader.Value; } if (reader.Name == "Tooltip") { tooltip = reader.Value; } if (reader.Name == "Image") { controller.Items.Add(itemname, tooltip, this.editControl1.ContextChoiceController.Images[reader.Value]); } } } } break; } } }
|
We have prepared a sample for your requirement and it can be downloaded from the following location.
Sample location: https://www.syncfusion.com/downloads/support/forum/118630/EditControlSample619030699.zip
Please look into the sample and kindly let us know if it helps you.
Please let us know if you need any further assistance,
Regards,
Ashwini
<param name="Charles">AAA</param> |
reader = new XmlTextReader(intellisensePath); while (reader.Read()) { string itemname = ""; switch (reader.NodeType) { case (XmlNodeType.Element): if (reader.Name == "param") { if (reader.AttributeCount > 0) { while (reader.MoveToNextAttribute()) { if (reader.Name == "name") { itemname = reader.Value; } if (reader.Name == "name") { //To Derive Name from the format, <param name="Charles">DDD</param>, where Name = Charles controller.Items.Add(itemname, this.editControl1.ContextChoiceController.Images[reader.Value]); } } } } break; case XmlNodeType.Text: { //To Derive text from the format <param name="David">AAA</param>, Where Text = AAA controller.Items.Add(reader.Value); } break; } } |
Hi Torsten,
Thank you for your update.
We are glad to hear that the provided solution meets your requirement.
Please let us know if you need any further assistance on this,
Regards,
Senthil