Can you help me understand data binding a little better with your grid?
In our code we are simply targeting iOS only with Xamarin Forms and as such in the code behind of the XAML form we populate a list of a model and then set the binding context …you are doing an MVVM style in your demo
I have a List<Customer> …how do I bind it to your grid?
I have tried and it seems to select the first row and not allow me to select any other row in the grid
Hi,
I am afraid your scenario is not clear to me. Would you please explain it in greater detail or provide me with a sample project? It will be very helpful for me. I am looking forward to your response.
Thanks
Alex
I have a customer model…no code at all.
I have database io code that returns a List<Customer> object
In a Xamarin Forms app you simply set the binding context and then bind in the XAML like such
//Get the stops
var allStops = new Database ().GetAllStops ();
//Set the binding
BindingContext = allStops;
listViewStops.ItemsSource = allStops;
Then in the XAML you simply bind the elements
<Label Text="{Binding CustName}"></Label>
This code works with Xamarin Forms but not with your grid.