Пример #1
0
        private void EditKeyCode(Mobilize.Web.VBUC.FlexGrid grid, dynamic txtBox, int KeyCode, int Shift)
        {
            switch (KeyCode)
            {
            case 27:   // ESC
                txtBox.RefValue.Text    = "";
                txtBox.RefValue.Visible = false;
                grid.Focus();
                break;

            case 13:   // Return
                grid.Focus();
                break;

            case 37:   // Left Arrow
                grid.Focus();
                Stub._System.Windows.Forms.Application.DoEvents();
                if (grid.CurrentColumnIndex > grid.FixedColumns)
                {
                    (
                        grid.CurrentColumnIndex)--;
                }

                break;

            case 38:   // Up Arrow
                grid.Focus();
                Stub._System.Windows.Forms.Application.DoEvents();
                if (grid.CurrentRowIndex > grid.FixedRows)
                {
                    (
                        grid.CurrentRowIndex)--;
                }

                break;

            case 39:   // Right Arrow
                grid.Focus();
                Stub._System.Windows.Forms.Application.DoEvents();
                if (grid.CurrentColumnIndex < grid.ColumnsCount - 1)
                {
                    (
                        grid.CurrentColumnIndex)++;
                }

                break;

            case 40:   // Down Arrow
                grid.Focus();
                Stub._System.Windows.Forms.Application.DoEvents();
                if (grid.CurrentRowIndex < grid.RowsCount - 1)
                {
                    (
                        grid.CurrentRowIndex)++;
                }

                break;
            }
        }
Пример #2
0
 private void MakeTextBoxVisible(Mobilize.Web.TextBox txtBox, Mobilize.Web.VBUC.FlexGrid grid)
 {
     txtBox.Text = Convert.ToString(grid[grid.CurrentRowIndex, grid.CurrentColumnIndex].Value);
     // txtBox.Move .CellLeft + .Left, .CellTop + .Top, .CellWidth, .CellHeight
     txtBox.Visible = true;
     txtBox.Enabled = true;
     // DoEvents
     txtBox.Focus();
     modFunctions.SelectAll(txtBox);
 }
Пример #3
0
        private void MakeTextBoxVisible(Mobilize.Web.TextBox txtBox, Mobilize.Web.VBUC.FlexGrid grid)
        {
            if (grid.CurrentRowIndex < 0 || grid.CurrentColumnIndex < 0)
            {
                return;
            }
            txtBox.Text    = Convert.ToString(grid[grid.CurrentRowIndex, grid.CurrentColumnIndex].Value);
            txtBox.Enabled = true;

            txtBox.Focus();
            Stub._System.Windows.Forms.Application.DoEvents();
            editingQuantity = true;
        }
Пример #4
0
 public static Stub._UpgradeHelpers.DataGridViewFlexEx Properties(
     this Mobilize.Web.VBUC.FlexGrid dataGridViewFlex)
 {
     return(new Stub._UpgradeHelpers.DataGridViewFlexEx());
 }