private void updateDataGridView(string name = null, string type = null) { dtCalendar = null; dtCalendar = Gtools.ToDataTable <GoogleCaledar>(GoogleCalendarAPIV3.listCalendar()); dgvCalendar.DataSource = dtCalendar; //dgvCalendar.Rows.Clear(); //foreach(GoogleCaledar item in GoogleCalendarAPIV3.listCalendar()) //{ // dgvCalendar.Rows.Add(new string[] { item.}) //} }
private void updateDataGridView(string name = null, string type = null) { if (InvokeRequired) { Invoke(new Action <string, string>(updateDataGridView), new object[] { name, type }); return; } dtDriveFiles = null; dtDriveFiles = Gtools.ToDataTable <GoogleDriveFile>(GoogleDriveAPIV3.listDriveFiles(name, type)); dgvFilesFromDrive.DataSource = dtDriveFiles; }