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

How do I highlight the items in the ContextPrompt list for the current parameter to be given as an input, in the EditControl?


For highlighting the items in the ContextPrompt list for the current parameter to be given as an input, you need to handle the ContextPromptUpdate event.

Refer to the code snippets to know more about it.


private void editControl1_ContextPromptUpdate(object sender, Syncfusion.Windows.Forms.Edit.ContextPromptUpdateEventArgs e)


// Select the items that should be bolded

if( e.List.SelectedItem != null )


IList list = editControl1.GetLexemsInsideCurrentStack( false );

if( list == null ) return;

int iBoldedIndex = 0;

foreach( ILexem lexem in list )


if( lexem.Text == "," )



if( iBoldedIndex >= e.List.SelectedItem.BoldedItems.Count )

e.List.SelectedItem.BoldedItems.SelectedItem = null;


e.List.SelectedItem.BoldedItems.SelectedItem = e.List.SelectedItem.BoldedItems[iBoldedIndex];




Private Sub editControl1_ContextPromptUpdate(sender As Object, e As

Syncfusion.Windows.Forms.Edit.ContextPromptUpdateEventArgs) Handles editControl1.ContextPromptUpdate

// Select the items that should be bolded

If Not (e.List.SelectedItem Is Nothing) Then

Dim list As IList = editControl1.GetLexemsInsideCurrentStack(False)

If list Is Nothing Then


End If

Dim iBoldedIndex As Integer = 0

Dim lexem As ILexem

For Each lexem In list

If lexem.Text = "," Then

iBoldedIndex += 1

End If

Next lexem

If iBoldedIndex >= e.List.SelectedItem.BoldedItems.Count Then

e.List.SelectedItem.BoldedItems.SelectedItem = Nothing


e.List.SelectedItem.BoldedItems.SelectedItem = e.List.SelectedItem.BoldedItems(iBoldedIndex)

End If

End If

End Sub 'editControl1_ContextPromptUpdate

Article ID: Published Date: Last Revised Date: Platform: Control:
357 04/30/2011 07/10/2014 WinForms EditControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to 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