This is a migrated thread and some comments may be shown as answers.

Adding tooltips

1 Answer 160 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 09 Sep 2010, 07:33 PM
I am trying to add tooltips to my unbound data grid... Can someone please let me know how to accomplish this through code? Below is how I am adding data to the grid.
Thanks for the help!

Craig

 

for (int i = 0; i < scheduleNotesList.Count; i++)

 

{

 

GridCommandCellElement cellElement = null;

 

 

GridViewRowInfo rowInfo = this.grdNotes.Rows.AddNew();

 

rowInfo.Cells[

"User"].Value = scheduleNotesList[i].AddedByUserIdSource.NameFirst + " " + scheduleNotesList[i].AddedByUserIdSource.NameLast;

 

rowInfo.Cells[

"PatientName"].Value = scheduleNotesList[i].PatientIdSource.FullName;

 

rowInfo.Cells[

"Note"].Value = scheduleNotesList[i].NotesDetail;

 

rowInfo.Cells[

"Note"].CellElement.ToolTipText = scheduleNotesList[i].NotesDetail;    //This throes a NullReferenceException.

 

rowInfo.Cells[

"DateAdded"].Value = scheduleNotesList[i].ModifiedDate.ToShortDateString() + " " + scheduleNotesList[i].ModifiedDate.ToShortTimeString();

 

}

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Sep 2010, 09:33 AM
Hello Craig,

Thank you for writing.

Please refer to our Examples application, section GridView >> Customize >> Tooltips. It demonstrates how you can set ToolTips to the cells of RadGridView. Basically, you need to need to handle the ToolTipTextNeeded event of RadGridView and set ToolTipText depending on the sender of the event.

Regards,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Craig
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or