private void HandleDoubleClick(object sender, EventArgs e) { if (initialRow >= 0 && initialRow < Rows.Count && (buttons & MouseButtons.Left) == MouseButtons.Left) { Item x = ((ItemView)Rows[initialRow].DataBoundItem).Item; if (x != null) { if (initialColumn >= 0 && initialColumn < Columns.Count && Columns[initialColumn].Name == "Name") { if (initialSelected) { EndEdit(); } } if (initialColumn >= 0 && initialColumn < Columns.Count && Columns[initialColumn].Name == "Style") { MainModel.EditStyle(x); } else { MainModel.Edit(x); } } } }
public override void OnClick(SourceGrid2.PositionEventArgs e) { base.OnClick(e); StackGrid g = (StackGrid)e.Grid; SourceLocation sl = (SourceLocation)(g[e.Position.Row, 0].Tag); Model.Edit(sl); }