Here's my issue...I have a list of servers, each with an ID and ServerName. I want to be able to select a server from the ComboBox and edit it in place, then have its ID available to update via SQL later. So let's say this is the data: (ID=1, Name="Server1"), (ID=2, Name="Server2"), (ID=3, Name="Server3"). If I select Server3 from the ComboBox, I'd like to edit it to be "Server4" then upload that with a SQL query (I know how to do this part). I'm utilizing MVVM, so all the values are properties of my ViewModel.

Currently, when the text field is modified in the ComboBox the SelectedServer immediately becomes null, presumably because it is no longer a value it recognizes. I could use some guidance on how to get this to do what I'm trying to do.

```
<ComboBox Grid.Column="1" x:Name="serverNameUpdateBox" HorizontalAlignment="Stretch" Height="23" VerticalAlignment="Center" IsEditable="True"
                          ItemsSource="{Binding Path=DataContext.SelectedProjectServers, ElementName=main}"
                          DisplayMemberPath="ServerName"
                          SelectedValue="{Binding SelectedServer}"
                          SelectedValuePath="ServerName"
                          Text="{Binding SelectedServer.ServerName, UpdateSourceTrigger=LostFocus}"
                          />

```

And ViewModel relevant code:

```
namespace ViewModel
{
    public class ViewModel : INotifyPropertyChanged
    {
        public ViewModel()
        {
            SelectedProjectServers = new List<Server>();
            SelectedServer = new Server();

            private Server _selectedServer;

            public Server SelectedServer
            {
                get { return _selectedServer; }
                set
                {
                    if (value == null) { ModifiedServer = _selectedServer; }
                    _selectedServer = value;
                    RaisePropertyChanged("SelectedServer");
                }
            }

            private List<Server> _selectedProjectServers;

            public List<Server> SelectedProjectServers
            {
                get { return _selectedProjectServers; }
                set
                {
                    _selectedProjectServers = value;
                    RaisePropertyChanged();
                }
            }
        }
    }
}

```

And Model relevant code:

```
namespace Model
{
    public class Server : INotifyPropertyChanged
    {
        private string _serverName;

        public string ServerName
        {
            get { return _serverName; }
            set
            {
                _serverName = value;
                RaisePropertyChanged();
            }
        }

        private int _serverID;

        public int ServerID
        {
            get { return _serverID; }
            set
            {
                _serverID = value;
                RaisePropertyChanged();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void RaisePropertyChanged([CallerMemberName] string caller = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller));
        }
    }
}

```