title: How To Create a Grid inside a Listview Binding Xamarin.Forms
body: <p>How can I create a Grid inside a ListView with data binding? I am creating this app with Xamarin.Forms.</p>
  
  <p>If I don't know how many rows and columns I need, how can I dynamically create the Grid inside the ListView binding?</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>&lt;ListView x:Name="List" HasUnevenRows="True"&gt;
    &lt;ListView.ItemTemplate&gt;
     &lt;DataTemplate&gt;
      &lt;ViewCell&gt;
        &lt;ViewCell.View&gt;
          &lt;Grid Padding="10,10,10,10"&gt;
            &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="200"&gt;&lt;/RowDefinition&gt;
            &lt;/Grid.RowDefinitions&gt;
            &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition  Width="200"&gt;&lt;/ColumnDefinition&gt;
            &lt;/Grid.ColumnDefinitions&gt;
            &lt;StackLayout BackgroundColor="#313FA0" Grid.Row="0" Grid.Column="0" HeightRequest="200" WidthRequest="200"&gt;
              &lt;Label Text="{Binding NUMBER}" FontSize="50" TextColor="White" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/&gt;
              &lt;Label Text="{Binding NAME}" FontSize="30" TextColor="White" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/&gt;
            &lt;/StackLayout&gt;
          &lt;/Grid&gt;
        &lt;/ViewCell.View&gt;
      &lt;/ViewCell&gt;
     &lt;/DataTemplate&gt;
    &lt;/ListView.ItemTemplate&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>In this code only one row and one column are created. If I have multiple data points, how can I resolve this issue? For example, if I need one row with two columns.</p>
  
  <p>Thanks in advance.</p>