private void PopulateUsedInvoices() { gridUsedInvoices.ItemsSource = ClsPEZAData.GetPEZA8112itemInvoices(tbPEZAFormNumber.Text.Trim() ).DefaultView; if (gridUsedInvoices.Items.Count > 0) { btnRemove8106.IsEnabled = false; } else { btnRemove8106.IsEnabled = false; } }