private void DataGridHistory_VisibleChanged(object sender, EventArgs e) { if (DataGridHistory.Visible) { DataGridHistory.ClearSelection(); } }
public void LoadCurrentDevice() { try { gridFilling = true; LoadHistoryAndFields(); if (currentViewDevice.IsTrackable) { LoadTracking(currentViewDevice.Guid); } SetPingHistoryLink(); SetTracking(currentViewDevice.IsTrackable, currentViewDevice.Tracking.IsCheckedOut); this.Text = this.defaultFormTitle + FormTitle(currentViewDevice); DataGridHistory.ClearSelection(); } catch (Exception ex) { ErrorHandling.ErrHandle(ex, System.Reflection.MethodBase.GetCurrentMethod()); } }