Forum Xamarin Xamarin.Forms

Grid inside tableView displays only 1 row

batmacibatmaci DEMember ✭✭✭✭✭

when I use Grid without tableview all rows are displayed fine but if i put it inside a tableview I see only the first row. Is there something I am doing wrong?

<TableView Intent="Settings">
        <TableRoot>
          <TableSection Title="User Settings">
            <ViewCell>

                <Grid>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="100" />
                    <RowDefinition Height="100" />
                    <RowDefinition Height="100" />
                   <RowDefinition Height="100" />
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition Width="150" />
                  </Grid.ColumnDefinitions>

                  <Label  Text="Name" Grid.Row="0" Grid.Column="0" TextColor="Black" StyleClass="Subheader"></Label>
                  <Entry x:Name="entName"  Grid.Row="0" Grid.Column="1"  Text="{Binding User.name}"  Placeholder="your name"/>

                  <Label  Text="Email" Grid.Row="1" Grid.Column="0" TextColor="Black" StyleClass="Subheader"></Label>
                  <Entry x:Name="entEmail"  Grid.Row="1" Grid.Column="1" Keyboard="Email" Text="{Binding User.Email}"  Placeholder="your email address"/>

                  <Label  Text="Password" Grid.Row="2" Grid.Column="0" TextColor="Black" StyleClass="Subheader"></Label>
                  <Entry x:Name="entPass"  Grid.Row="2" Grid.Column="1" IsPassword="True" Text="{Binding User.Password}"  Placeholder="your password"/>


                  <Button Command="{Binding SkipClick}" Text="Skip" Grid.Row="3" Grid.Column="0" />
                  <Button Command="{Binding SaveClick}" Text="Save Stats"  Grid.Row="3" Grid.Column="1"/>
                </Grid>


            </ViewCell>
          </TableSection>
        </TableRoot>
      </TableView>

Best Answer

Answers

  • GoodlyGoodly Member

    Hi @batmaci

    If at all you want to use grid . Just paste this HasUnevenRows="True" in your TableView Intent. It will work fine.

    Thanks
    Goodly

  • GoodlyGoodly Member
    edited July 2018

    TableView Intent="Settings" HasUnevenRows="True"

    goodly

Sign In or Register to comment.