These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

get root folder permissions from array?

Using something like

fileVistaControlInstance.RootFolders(0).Permissions = ?

How would you pass in an array/arraylist/collection?  I am querying the permissions for each user from a database, I need to be able to pass in multiple values, such as 

FileVistaPermissions.Traverse Or FileVistaPermissions.Upload Or FileVistaPermissions.List

Thanks -

andy
andy 12/16/2008 9:43 PM
Nevermind, I figured it out.  I'm not the best programmer but I hope this helps someone.  Given colPermissions as a 1-based collection of FileVistaPermissions objects and 'fc' as a FileVistaControl:

    For i As Integer = 1 To colPermissions.Count
        If i = 1 Then
            fc.RootFolders(0).Permissions = colPermissions.Item(i)
        Else
        fc.RootFolders(0).Permissions = fc.RootFolders(0).Permissions Or colPermissions.Item(i)
        End If
        MsgBox("fc.RootFolders(0).Permissions is " & fc.RootFolders(0).Permissions.ToString)
    Next

By the time you've iterated through the last item of your collection, the message box will be putting out something like 'fc.RootFolders(0).Permission is download, traverse, list, copy, edit'.
These values will then successfully be passed to the FileVistaControl 'fc'.

Thanks for a great control, Cem and company, but where do I download the user manual? ;) j/k

andy
andy 12/16/2008 10:42 PM
Hi Andy,
I am glad you implemented a solution for your problem. Note that this is specific to your implementation and the control only exposes the events and properties so you need to implement your own way to integrate the control. However we plan to include more examples for integration and a documentation :)
Cem Alacayir 1/6/2009 3:13 PM