or
I tried to use "foreach" and "for" to get all rows in the demo of GridView Folder tree, but failed
for (int i = 0; i <
radGridView1.Rows.Count
; i++)
{
}
foreach
(GridViewRowInfo fvri in radGridView1.Rows)
{
}
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();
}