Click here to Skip to main content
15,884,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone.

I have a code to GET a list of my account files on Google Drive using api V2 in VB Net. It works fine but I dont know how to show the retrieved result in a listview or datagridview.

Here is the code:

VB
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim Secrets = New ClientSecrets()
        Secrets.ClientId = "Client Id Here"
        Secrets.ClientSecret = "Client secret here"

        Dim scope = New List(Of String)
        scope.Add(DriveService.Scope.Drive)

        Dim credential = GoogleWebAuthorizationBroker.AuthorizeAsync(Secrets, scope, "user", CancellationToken.None).Result()

        Dim initializer = New BaseClientService.Initializer
        initializer.HttpClientInitializer = credential
        initializer.ApplicationName = "Application name here"

        Dim service = New DriveService(initializer)
        Dim request As FilesResource.ListRequest = service.Files.List()
        Dim files As FileList = request.Execute()
    End Sub


Thank you very much.
Posted
Comments
[no name] 15-Aug-14 19:52pm    
Okay..... decide which control you want to display your information in, then decide which UI platform you want to use, then go read the documentation for the control and platform you decided on, write the code to display your information according the documentation.
hitman133 15-Aug-14 20:01pm    
Thanks Wes.
Im working in a desktop windows application
In datagridview case... where can i find that documentation.

Sorry if its poorly worded, im noob with apis.
[no name] 15-Aug-14 20:06pm    
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview(v=vs.110).aspx
hitman133 15-Aug-14 20:14pm    
Thank you very much

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900