Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
How to get the selected item
posted

I have a class like this one :
public class Car
{
      private string _color;
      public string Color
        {
            get { return _reference; }
            set
            {
                _reference = value;
            }
        }
...
...
}

 I bind the cars to the xamDataGrid like this
List<Car> myList;
myXamDataGrid.DataSource = myList;

Everything is good until I try to get the car I select into the grid. How can I get the 'Car' objet that is selected?

 

Thanks