In my CustomProvider I've added an Attribute to a FileItem and I'm
displaying it in the Grid as a new column. This Attribute is based on
business logic and shows the status of the File (checked-out/in). The
column is called 'Status' and when checked out the row displays
'Locked'.
Couple of things:
1) how do I change the backbround on any grid rows that are 'Locked'? In other words how do I get the Attribute server-side?
2) when the user selects the 'Locked' row I want to disable some elements in the Toolbar as well as the selected grid row contextmenu. Specifically, I want to grey-out the 'Delete' item in the contextmenu when a file is checked out.
I have added 2 ToolBar items to the Explorer: 'Check Out' and 'Edit File'. If the selected item is already checked out, I want to change the 'Check Out' ToolBar item to 'Check In' (of course I'll need to run a security check to make sure the person who has the file checked out is the same as the current user).
I've tried using ExplorerPopulated and I can correctly get the 'Locked' item as below, but I'm stuck on how to do 1) and 2) above.
Thanks,
Steve
Couple of things:
1) how do I change the backbround on any grid rows that are 'Locked'? In other words how do I get the Attribute server-side?
2) when the user selects the 'Locked' row I want to disable some elements in the Toolbar as well as the selected grid row contextmenu. Specifically, I want to grey-out the 'Delete' item in the contextmenu when a file is checked out.
I have added 2 ToolBar items to the Explorer: 'Check Out' and 'Edit File'. If the selected item is already checked out, I want to change the 'Check Out' ToolBar item to 'Check In' (of course I'll need to run a security check to make sure the person who has the file checked out is the same as the current user).
I've tried using ExplorerPopulated and I can correctly get the 'Locked' item as below, but I'm stuck on how to do 1) and 2) above.
| Private Sub DocumentExplorer_ExplorerPopulated(ByVal sender As Object, ByVal e As RadFileExplorerPopulatedEventArgs) |
| Dim items As List(Of Widgets.FileBrowserItem) = e.List |
| 'Dim isGridPopulated As Boolean = items.Exists(Function(it) (TypeOf it Is Widgets.FileItem)) |
| 'If (isGridPopulated) Then |
| Dim i As Integer = 0 |
| While i < items.Count |
| If TypeOf items(i) Is Widgets.FileItem Then |
| If items(i).Attributes("Status").ToString = "Locked" Then |
| ' how do I get the contextmenu here so I can grey out some of the items? |
| ' also the comment line below seems to have no effect!!!!!!!! |
| 'items(i).Permissions = Widgets.PathPermissions.Read |
| End If |
| End If |
| i += 1 |
| End While |
| 'End If |
| End Sub |
Thanks,
Steve
