Exemplo n.º 1
0
        private void _dgvGrid_DoubleClick(object sender, EventArgs e)
        {
            // After Double-Click on Grid Cell or RowHeader, fires GridDoubleClick event and passing DataRow.

            try
            {
                if (_htt == DataGridViewHitTestType.Cell || _htt == DataGridViewHitTestType.RowHeader)
                {
                    var cur = Cursor.Current;
                    Cursor.Current = Cursors.WaitCursor;

                    if (DataGridView.CurrentRow != null)
                    {
                        if (DataGridView.Rows.Count > 0 && DataGridView.CurrentRow.Index + 1 <= DataGridView.Rows.Count)
                        {
                            var drv    = (DataRowView)BindingSource.Current;
                            var dgvRow = drv.Row;
                            var de     = new GridDoubleClickEventArgs {
                                Row = dgvRow
                            };
                            GridDoubleClick(this, de);
                        }
                    }

                    Cursor.Current = cur;
                }
            }
            catch {}
        }
 void _controller_DoubleClick(object sender, GridViewControllerEventArgs e)
 {
     if (GridDoubleClick != null)
     {
         GridDoubleClickEventArgs args = new GridDoubleClickEventArgs(e.Data, e.DataBoundType);
         GridDoubleClick(this, args);
     }
 }
Exemplo n.º 3
0
        private void Grid_DoubleClick(object sender, GridDoubleClickEventArgs e)
        {
            //_oneIssueDataTable.Clear();
            //GridSettingsCD.IssuesRow dr = _oneIssueDataTable.NewIssuesRow();
            //dr.ItemArray = e.Row.ItemArray;
            //_oneIssueDataTable.Rows.Add(dr);
            //_bsIssue.DataSource = _oneIssueDataTable;
            //_oneIssueDataTable.AcceptChanges();

            //btnSave.Visible = true;
            //btnCancel.Visible = true;
            //btnNew.Visible = false;
        }
Exemplo n.º 4
0
        void _controller_DoubleClick(object sender, GridViewControllerEventArgs e)
        {
            if (e.Data == null)
            {
                return;
            }

            if (GridDoubleClick != null)
            {
                GridDoubleClickEventArgs args = new GridDoubleClickEventArgs(e.Data, e.DataBoundType);
                GridDoubleClick(this, args);
            }

            if (e.Data.GetType().Equals(typeof(DataItemEntityDev)))
            {
                _editDataItemEntityCommand.Excute();
            }
        }