Jason Gaylord
Top achievements
Rank 1
Jason Gaylord
asked on 16 Feb 2011, 04:33 PM
I've changed the look and feel of the normal dropdownlist by handling the VisualListItemFormatting event. However, how can I change the look of the items shown when using autocomplete?
5 Answers, 1 is accepted
0
Richard Slade
Top achievements
Rank 2
answered on 16 Feb 2011, 04:39 PM
Hi,
As far as I know, this is not possible as the textbox item part of the drop down is the same as the RadTextBox.. Have a look at my answer in this forum post for more information.
Richard
As far as I know, this is not possible as the textbox item part of the drop down is the same as the RadTextBox.. Have a look at my answer in this forum post for more information.
Richard
0
Jason Gaylord
Top achievements
Rank 1
answered on 16 Feb 2011, 04:40 PM
Makes sense. I see a feature request here. :)
0
Hello Jason,
You can find the answer to your question in the ticket which concerns the same topic.
Best wishes,
You can find the answer to your question in the ticket which concerns the same topic.
Best wishes,
Ivan Todorov
the Telerik team
0
Rowen
Top achievements
Rank 1
answered on 22 Apr 2012, 03:19 AM
Hi, can you please post the answer or the link to the answer? I cannot find any information on this.
0
Hello Rowen,
Thank you for writing.
You can handle the PopupOpened event and the VisualItemFormatting event to change the look and feel of the items. The following code snippet demonstrates this:
Hope this helps. Should you have any further questions, feel free to ask.
All the best,
Ivan Todorov
the Telerik team
Thank you for writing.
You can handle the PopupOpened event and the VisualItemFormatting event to change the look and feel of the items. The following code snippet demonstrates this:
radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.VisualItemFormatting +=
new
VisualListItemFormattingEventHandler(DropDownList_VisualItemFormatting);
radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.PopupOpened +=
new
EventHandler(DropDownList_PopupOpened);
void
DropDownList_PopupOpened(
object
sender, EventArgs e)
{
foreach
(RadListVisualItem item
in
((RadDropDownListElement)sender).ListElement.ViewElement.Children)
//loop troughs visual items
{
item.BackColor = Color.Red;
}
}
void
DropDownList_VisualItemFormatting(
object
sender, VisualItemFormattingEventArgs args)
{
args.VisualItem.BackColor = Color.Red;
Debug.WriteLine(args.VisualItem.Text);
}
Hope this helps. Should you have any further questions, feel free to ask.
All the best,
Ivan Todorov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>