Exemple #1
0
 private void GridExVillage_InitCustomEdit(object sender, InitCustomEditEventArgs e)
 {
     if (e.Column == _columns[VillageFields.Type] && e.Row.RowType == RowType.FilterRow)
     {
         e.EditControl = _villageTypeBox;
     }
 }
Exemple #2
0
        /// <summary>
        /// Edit: PlayerTribeSelector
        /// </summary>
        private void MarkersGrid_InitCustomEdit(object sender, InitCustomEditEventArgs e)
        {
            if (e.Column.Key == "Name")
            {
                var rowData = e.Row.DataRow as MarkerGridRow;
                if (rowData != null)
                {
                    if (rowData.Player != null)
                    {
                        _playerTribeSelector.SetPlayer(rowData.Player);
                    }
                    else
                    {
                        _playerTribeSelector.SetTribe(rowData.Tribe);
                    }
                }
                else
                {
                    _playerTribeSelector.EmptyTextBox(false);
                }

                e.EditControl = _playerTribeSelector;
            }
        }
Exemple #3
0
 private void gridEX1_InitCustomEdit(object sender, InitCustomEditEventArgs e)
 {
 }
Exemple #4
0
        /// <summary>
        /// Edit: PlayerTribeSelector
        /// </summary>
        private void MarkersGrid_InitCustomEdit(object sender, InitCustomEditEventArgs e)
        {
            if (e.Column.Key == "Name")
            {
                var rowData = e.Row.DataRow as MarkerGridRow;
                if (rowData != null)
                {
                    if (rowData.Player != null)
                    {
                        _playerTribeSelector.SetPlayer(rowData.Player);
                    }
                    else
                    {
                        _playerTribeSelector.SetTribe(rowData.Tribe);
                    }
                }
                else
                {
                    _playerTribeSelector.EmptyTextBox(false);
                }

                e.EditControl = _playerTribeSelector;
            }
        }
 private void GridExVillage_InitCustomEdit(object sender, InitCustomEditEventArgs e)
 {
     if (e.Column == _columns[VillageFields.Type] && e.Row.RowType == RowType.FilterRow)
     {
         e.EditControl = _villageTypeBox;
     }
 }
Exemple #6
0
        private void gridEX_InitCustomEdit(object sender, InitCustomEditEventArgs e)
        {
            txtCustom.ReadOnly = false;

            string column = e.Column.Key;

            //When the user start edition by pressing a key, the EditChar
            //property holds the char that started the edition. If edition
            //was started because the user clicked in the cell the EditChar
            //returns (char)0
            if (e.EditChar != (char)0 && !txtCustom.ReadOnly)
            {
                txtCustom.Text = e.EditChar.ToString();
                txtCustom.SelectionStart = txtCustom.Text.Length;
            }
            else
            {
                if (e.Value == null)
                {
                    txtCustom.Text = "";
                }
                else
                {
                    txtCustom.Text = e.Value.ToString();
                }

                txtCustom.SelectionLength = txtCustom.Text.Length;
            }
            //Set the EditControl property to let the GridEX control
            //know which control to position in the cell.
            e.EditControl = txtCustom;
        }