I'm creating a windows explorer interface and I'd like to display checkboxes for files and not directories. If I set isOptionElementsEnabled to true it shows checkboxes next to them all. I tried setting isOptionElementsEnabled to true and then programmatically disabling the checkboxes for directories this way:
but it didn't work. Is there anyway to do this outside of using two separate treeviews on top of each other?
DirectoryInfo di =
new
DirectoryInfo(_currentPath);
DirectoryInfo[] directories = di.GetDirectories();
FileInfo[] files = di.GetFiles();
foreach
(DirectoryInfo dInfo
in
directories)
{
RadTreeViewItem tvDirectoryItem =
new
RadTreeViewItem() { Header = dInfo.Name, DefaultImageSrc =
"folder_icon.gif"
};
tvDirectoryItem.ItemsOptionListType = OptionListType.None;
tvDirectory.Items.Add(tvDirectoryItem);
}
foreach
(FileInfo fInfo
in
files)
{
//tvDirectory.IsOptionElementsEnabled = true;
RadTreeViewItem tvFileItem =
new
RadTreeViewItem() { Header = fInfo.Name };
tvFileItem.ItemsOptionListType = OptionListType.CheckList;
tvDirectory.Items.Add(tvFileItem);
}
but it didn't work. Is there anyway to do this outside of using two separate treeviews on top of each other?