private void grdCommands_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { var row = grdCommands.Rows[e.RowIndex]; row.Selected = true; ClearCommandUI(); var cmdCtrl = new CustomCommandPropertyCtrl(); cmdCtrl.Dock = DockStyle.Fill; //HACK: Mono workaround. It has problems with DataBoundItem var dec = row.DataBoundItem as CommandDecorator; if (dec != null) { ICommand cmd = dec.DecoratedInstance; cmdCtrl.Bind(cmd, _edsvc); grpCommand.Controls.Add(cmdCtrl); EvaluateCommands(); } } }