private void loadData() { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.label_uploading.InvokeRequired) { _loadData d = new _loadData(loadData); this.Invoke(d); } else { gridControlAttachment.DataSource = null; gridControlAttachment.DataSource = ct.attachments; //DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Uploading..." + text); } }