Hi There,
I'm working on a grid which has a GridViewComboBoxColumn. the column is often not wide enough the fit the item text. So i wanted to add a tool tip for each item in the list.
I found this article which seemed to be what i was after:
http://www.telerik.com/community/forums/winforms/dropdownlist-and-listcontrol/auto-horizontal-scroll-and-item-tooltip-in-radlistcontrol.aspx
but my code doesn't seem to work:
Any idea why this doesn't work? I can do other things, like set the bgcolor to red and that works as expected
Many thanks,
Matt
I'm working on a grid which has a GridViewComboBoxColumn. the column is often not wide enough the fit the item text. So i wanted to add a tool tip for each item in the list.
I found this article which seemed to be what i was after:
http://www.telerik.com/community/forums/winforms/dropdownlist-and-listcontrol/auto-horizontal-scroll-and-item-tooltip-in-radlistcontrol.aspx
but my code doesn't seem to work:
protected
void
rgDraft_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
if
(e.Column.Name ==
"Country"
)
{
RadDropDownListEditor editor = (RadDropDownListEditor)
this
.rgDraft.ActiveEditor;
RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
editorElement.VisualItemFormatting +=
new
VisualListItemFormattingEventHandler(
delegate
(
object
formattingsender, VisualItemFormattingEventArgs args)
{
args.VisualItem.ToolTipText = args.VisualItem.Text;
});
}
}
Any idea why this doesn't work? I can do other things, like set the bgcolor to red and that works as expected
Many thanks,
Matt