private void buttonDuplicateAttRule_Click(object sender, EventArgs e) { var r = EditorTools.GetSelectedDtoFromTable <AttributionRuleDTO>(this.dataGridViewAttributionRules); if (r != null) { var newRule = LoadedAsset.AddAttributionRule(r); attributionRules.DataSource = LoadedAsset.GetAttributionRules().ToList(); EditorTools.HighlightItemInGrid <AttributionRuleDTO>(dataGridViewAttributionRules, newRule.Id); SetModified(); } }