I wonder if there is a proper approach to solve this situation. Imagine you are getting dynamic data into something like this:
<ListView HasUnevenRows="True"
ItemsSource="{Binding RecentSurveysList} "
SelectedItem="{Binding Selected, Mode=TwoWay}"
ItemSelected="ListView_OnItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="20">
<Label Text="{Binding Id}" VerticalOptions="Start" Margin="0, 0 ,60 ,0"></Label>
<Label Text="{Binding Date}" HorizontalOptions="Start" VerticalOptions="Center" Margin="0, 0 ,20 ,0"></Label>
<Label Text="{Binding RecentLocationName}" HorizontalOptions="Start" VerticalOptions="Center" Margin="0, 0 ,20 ,0"></Label>
<Label Text="{Binding ClientFirstName}" HorizontalOptions="Start" VerticalOptions="Center" Margin="0, 0 ,20 ,0"></Label>
<Label Text="{Binding ClientLastName}" HorizontalOptions="Start" VerticalOptions="Center" Margin="0, 0 ,20 ,0"></Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Problem N1
Now ID can be 123 or 34816349714 and the problem is that the data for the next cells is shifted so everything is off grid.
Problem N2
I want to set a column title for each colum on top.
Maybe listview wasn't the best choice but does any one have a ready approach they use for this scenario? Thanks.
I managed this issue like this using a grid, stacklayout and listview alltogether.