I know that Xamarin XAML does not support an HTML table:
<table><th/><tr><td>Data Here</td></tr></table>
I have a databound collection view that gets data from a SQLite database, let's say it's the Person class:
<CollectionView x:Name="collectionView">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Margin="0" Padding="0,0,0,0">
<Label Grid.Row="0" Grid.Column="0" Text="{Binding FirstName}" />
<Label Grid.Row="0" Grid.Column="1" Text="{Binding LastName}" />
<Label Grid.Row="1" Grid.Column="0" Text="{Binding TABLEDATA}" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
When I populate the database there is data that is dynamic and will not always fill one row. Sometimes it's one row, sometimes it's eight rows, like a person's work history.
I save the data as a string with an Envirnment.Newline(); deliminator to make the text readable and fill the database field "TABLEDATA".
I want to fill that database field with text like this:
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
and databind it to something in Xamarin XAML that will render it.
Does anyone have any ideas?
In your C# code, create an observable collection of your object type:
Populate your data to the list:
In XAML create a grid inside a CollectionView:
Alternatively, check the DataGrid in Syncfusion.