Ejemplo n.º 1
0
        private void gridView1_KeyDown(object sender, KeyEventArgs e)
        {
            //cmdNew.Focus();
            //return;

            GridView view = sender as GridView;

            if (view == null)
            {
                return;
            }



            if (e.KeyCode == Keys.Return)
            {
                CausaleAmministrativa c = view.GetFocusedRow() as CausaleAmministrativa;
                if (c != null)
                {
                    if (Causaleselected != null)
                    {
                        Causaleselected.Invoke(this, new SelectCausaleEventArg(c));
                        this.Close();
                    }
                }
            }
            else if (e.KeyCode == Keys.Tab)
            {
                cmdNew.Focus();
            }
        }
Ejemplo n.º 2
0
        private void DoRowDoubleClick(GridView view, Point pt)
        {
            GridHitInfo info = view.CalcHitInfo(pt);

            if (info.InRowCell)
            {
                CausaleAmministrativa label = view.GetRow(view.FocusedRowHandle) as CausaleAmministrativa;
                if (label != null)
                {
                    //ShowDialogForm(label);
                    if (Causaleselected != null)
                    {
                        Causaleselected.Invoke(this, new SelectCausaleEventArg(label));
                        this.Close();
                    }
                }
            }
        }