Beispiel #1
0
        private void gridControl_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
        {
            var             grid = (GridControl)sender;
            GridCurrentCell cc   = grid.CurrentCell;

            switch (cc.ColIndex)
            {
            case 5:     // pembayaran
                e.Handled = KeyPressHelper.NumericOnly(e);
                break;

            default:
                break;
            }
        }
        private void gridControl_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
        {
            var             grid = (GridControl)sender;
            GridCurrentCell cc   = grid.CurrentCell;

            // validasi input angka untuk kolom jumlah dan harga
            switch (cc.ColIndex)
            {
            case 4:     // jumlah
            case 5:     // harga
                e.Handled = KeyPressHelper.NumericOnly(e);
                break;

            default:
                break;
            }
        }