private void btnDownload_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (this.FilesGridView.GetFocusedRow() is Files item) { ScannerHelper.DownloadFile("Document-Files", item.Id, web => { web.DownloadProgressChanged += Web_DownloadProgressChanged; }); } }