I am using RadToolTipManager in sharepoint web part with SPGridView & Ajax.
on gridView_RowDataBound, I am adding controls in RadToolTipManager
void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string ID = DataBinder.Eval(e.Row.DataItem, "ID").ToString();
Label lbl = (Label)e.Row.FindControl("lblFieldName");
RadToolTipManager1.TargetControls.Add(lbl.ClientID, ID, true);
}
}
catch(Exception ex)
{
}
}
This is my first column in Grid.
So when I hover mouse on the first column. ToolTip is appearing.
But only problem is that, When I hove mouse first time on column,
ToolTip appear on Left Bottom position relative to page and not with grid column.
But next time it will appear at correct position. i.e. On First Grid Column.
This is my code, how I added RadToolTipManager in web part
RadToolTipManager1 = new RadToolTipManager();
RadToolTipManager1.AjaxUpdate += new ToolTipUpdateEventHandler(RadToolTipManager1_AjaxUpdate);
RadToolTipManager1.RelativeTo = ToolTipRelativeDisplay.Mouse;
RadToolTipManager1.Position = ToolTipPosition.BottomRight;
RadToolTipManager1.HideEvent = ToolTipHideEvent.ManualClose;
this.panel.Controls.Add(RadToolTipManager1);
Please reply,
Thanks
Savan