// Check keywords of the current file and display them in data grid view public void RefreshDgk_file() { FilePersonKeywordClient client = new FilePersonKeywordClient(); if (listBox_Files.SelectedIndex >= 0) { if (client.GetFileByPath(listBox_Files.SelectedItem.ToString()) != null) { dgk_file.ClearSelection(); dgk_file.DataSource = client.GetKeywordsOfFile(listBox_Files.SelectedItem.ToString()); client.Close(); } } }