PowerArgs.Cli.Grid.SetFilterTextBox C# (CSharp) Method

SetFilterTextBox() private method

private SetFilterTextBox ( TextBox value ) : void
value TextBox
return void
        private void SetFilterTextBox(TextBox value)
        {
            if(_filterTextBox != null)
            {
                throw new ArgumentException("Grid is already bound to a text box");
            }

            _filterTextBox = value;
            _filterTextBox.SubscribeForLifetime(nameof(TextBox.Value), FilterTextValueChanged, value.LifetimeManager);
            _filterTextBox.KeyInputReceived.SubscribeForLifetime(FilterTextKeyPressed, value.LifetimeManager);
            FilteringEnabled = true;
        }