I'm sure I'm doing something wrong here, but I followed the documentation and it still doesn't seem to be working. All I get is a blank item in my ListView. Here's the code to recreate my issue. The columns I've added to the control at design-time are named exactly what they indicate below.
private
void
LoadFiles(DirectoryInfo dir)
{
FileInfo[] files = dir.GetFiles();
this
.lvFiles.Items.Clear();
this
.lvFiles.Items.BeginUpdate();
foreach
(FileInfo file
in
files)
{
Telerik.WinControls.UI.ListViewDataItem listItem =
new
Telerik.WinControls.UI.ListViewDataItem();
this
.lvFiles.Items.Add(listItem);
listItem[
"Name"
] = file.Name;
listItem[
"DateTime"
] = file.LastWriteTime.ToString();
listItem[
"Type"
] =
"file"
;
listItem[
"Size"
] = UtilLib.FileIO.ToByteString(file.Length);
listItem[
"Uploaded By"
] =
"Wango"
;
listItem.Tag = file;
}
this
.lvFiles.Items.EndUpdate();
}