Hi,
I'm using a custom content provider for the FileExplorer component, and I want to conditionally change the folder and file icons for the _grid_ depending on the "state" of that particular folder or file.
For example, say I've just selected a folder in the TreeView, and the grid is now displaying the contents of that selected folder. The grid might now have the following content: Folder1, Folder2, fileA, fileB
At server side, I know that e.g. Folder2 and fileB are "special" in some way, and I want to mark the client markup that is generated for these two items with a "special css class". The idea is that this css class will be used to override the standard icons used.
Is there a way of doing this? (Preferrably server side, since there I've already got all information and infrastructure ready).
My first idea was to traverse the fileExplorer.Grid.Items in Page_PreRender looking for GridDataItems that met a special criteria. However, I can't seem to find find any property in the GridDataItems that maps to the corresponding DirectoryItems that backs the FileExplorer. If I could use a value in the GridDataItem to find out which DirectoryItem it represents, i.e. the DirectoryItems path property, I could then set a css class based on that. (This strategy is what I'm currently using for the icon override in the TreeView, since the RadTreeNode.Value is the same as the DirectoryItem.Name)
Another idea was to add a css class directly on the DirectoryItem at the time of Provider.ResolveRootDirectoryAsTree(..) running. But I haven't found a way of doing it in that manner.
Do you have any suggestions on how to accomplish what I'm looking for?
Thank you in advance,
Regards Andreas
I'm using a custom content provider for the FileExplorer component, and I want to conditionally change the folder and file icons for the _grid_ depending on the "state" of that particular folder or file.
For example, say I've just selected a folder in the TreeView, and the grid is now displaying the contents of that selected folder. The grid might now have the following content: Folder1, Folder2, fileA, fileB
At server side, I know that e.g. Folder2 and fileB are "special" in some way, and I want to mark the client markup that is generated for these two items with a "special css class". The idea is that this css class will be used to override the standard icons used.
Is there a way of doing this? (Preferrably server side, since there I've already got all information and infrastructure ready).
My first idea was to traverse the fileExplorer.Grid.Items in Page_PreRender looking for GridDataItems that met a special criteria. However, I can't seem to find find any property in the GridDataItems that maps to the corresponding DirectoryItems that backs the FileExplorer. If I could use a value in the GridDataItem to find out which DirectoryItem it represents, i.e. the DirectoryItems path property, I could then set a css class based on that. (This strategy is what I'm currently using for the icon override in the TreeView, since the RadTreeNode.Value is the same as the DirectoryItem.Name)
Another idea was to add a css class directly on the DirectoryItem at the time of Provider.ResolveRootDirectoryAsTree(..) running. But I haven't found a way of doing it in that manner.
Do you have any suggestions on how to accomplish what I'm looking for?
Thank you in advance,
Regards Andreas