I promised that I will continue the "tooltips" series by demonstrating a "HOWTO" approach with our RadMultiColumnComboBox component.
private
void
TestComboBox1_Load(
object
sender, EventArgs e)
{
// TODO: This line of code loads data into the 'nwindDataSet.Cars' table. You can move, or remove it, as needed.
this
.carsTableAdapter.Fill(
this
.nwindDataSet.Cars);
this
.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.ToolTipTextNeeded +=
new
Telerik.WinControls.ToolTipTextNeededEventHandler(EditorControl_ToolTipTextNeeded);
}
void
EditorControl_ToolTipTextNeeded(
object
sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
GridDataCellElement element = sender
as
GridDataCellElement;
if
(element ==
null
)
{
return
;
}
string
message =
"This cell is positioned at row:{0}, column:{1} and its data type is {2}"
;
GridViewDataColumn column = element.ColumnInfo
as
GridViewDataColumn;
if
(column !=
null
)
{
e.ToolTipText =
string
.Format(message, element.RowIndex, element.ColumnIndex, column.DataType.ToString());
}
}
Nikolay Diyanov Diyanov is the Product Manager of the Native Mobile UI division at Progress. Delivering outstanding solutions that make developers' lives easier is his passion and the biggest reward in his work. In his spare time, Nikolay enjoys travelling around the world, hiking, sun-bathing and kite-surfing.
Find him on Twitter @n_diyanov or on LinkedIn.