I am trying to add items from FileInfo into my RadListBox although I am not able to, I tried casting the file into a RadListBoxItem object, but I get the error that it can not convert a string to a radlistboxitem. Can someone shed a little light? thanks.
DirectoryInfo dir = new DirectoryInfo(Path.GetFullPath(fp));
lb_Files.Items.Clear();
foreach (FileInfo file in dir.GetFiles())
{
RadListBoxItem rlb = new RadListBoxItem();
rlb = (RadListBoxItem)file.ToString();
//radListBox
lb_Files.Items.Add(rlb.ToString());
}
Try this