Hello together,
I'm having some difficulties with a RadListView. My RadListView has 3 Columns: 1 for displaying an icon, 1 for a filename and the third for the author.
My problem is, that only the first column is displayed and all the text columns are empty. I don't know why. Perhaps someone of you can help. Here is the code:
And that's how it looks like in debug (see attachment):
I'm having some difficulties with a RadListView. My RadListView has 3 Columns: 1 for displaying an icon, 1 for a filename and the third for the author.
My problem is, that only the first column is displayed and all the text columns are empty. I don't know why. Perhaps someone of you can help. Here is the code:
ImageList MyImageList =
new
System.Windows.Forms.ImageList();
MyImageList.Images.Add(global::Test_SharePoint_DocumentList.Properties.Resources.icgen);
MyImageList.ImageSize =
new
Size(16, 16);
lst_Files.ViewType = Telerik.WinControls.UI.ListViewType.DetailsView;
lst_Files.ShowGridLines =
true
;
lst_Files.FullRowSelect =
true
;
lst_Files.Columns.Add(
"File"
,
"File"
);
lst_Files.Columns.Add(
"Filename"
,
"Filename"
);
lst_Files.Columns.Add(
"Author"
,
"Author"
);
lst_Files.Columns[0].Width = 30;
lst_Files.SmallImageList = MyImageList;
foreach
(Microsoft.SharePoint.SPFile file
in
files)
{
for
(
int
j = 0; j < MyImageList.Images.Count; j++)
{
Telerik.WinControls.UI.ListViewDataItem item2 =
new
Telerik.WinControls.UI.ListViewDataItem();
item2.Image = global::Test_SharePoint_DocumentList.Properties.Resources.icgen;
item2.ImageIndex = j;
item2.Tag = mysite.Url +
"/"
+ file.Name;
Telerik.WinControls.UI.ListViewDataItem item3 =
new
Telerik.WinControls.UI.ListViewDataItem();
item3.Text = file.Name;
item3.Value = file.Name;
Telerik.WinControls.UI.ListViewDataItem item4 =
new
Telerik.WinControls.UI.ListViewDataItem();
item4.Text = file.Author.ToString();
item4.Value = file.Author.ToString();
Telerik.WinControls.UI.ListViewSubDataItemCollection subcol =
new
Telerik.WinControls.UI.ListViewSubDataItemCollection(item2);
subcol.Add(item3);
subcol.Add(item4);
lst_Files.Items.Add(item2);
}
Count++;
}
And that's how it looks like in debug (see attachment):