Custom grid alignment problem with Main Grid header

Hello,

I am trying to have custom grid control in main grid control. Problem is I am not able to align custome grid contents with header set in Main grid in another page.
Below is custom grid
`

        <Label  Grid.Column="0"/>
        <Entry  Grid.Column="1" VerticalOptions="Center" HorizontalOptions="Center"/>
        <Entry  Grid.Column="2" VerticalOptions="Center" HorizontalOptions="Center"/>
        <Entry  Grid.Column="3" VerticalOptions="Center" HorizontalOptions="Center"/>
        <Entry Grid.Column="4" VerticalOptions="Center" HorizontalOptions="Center"/>
        <Entry  Grid.Column="5" VerticalOptions="Center" HorizontalOptions="Center"/>

`

This is main grid where I am using custom grid with header having rowspan 2 ..I am defining columndefinitions in main grid as per header
`

                <Label Grid.Column="1" Text="Number Of Items" Grid.Row="0" Grid.RowSpan="2" />
                    <Label Grid.Column="2" Text="Cost Items/Days (Rs.)" Grid.Row="0" Grid.RowSpan="2"/>
                    <Label Grid.Column="3" Text="Average Cost Items/Days (Rs.)" Grid.Row="0" Grid.RowSpan="2"/>
                    <Label Grid.Column="4" Text="Room Space (sq.ft.)" Grid.Row="0" Grid.RowSpan="2"/>
                    <Label Grid.Column="5" Text="Deposit @ admission" Grid.Row="0" Grid.RowSpan="2"/>

                <controls:CustomRow Grid.Row="2" Title="NICU" />

<\Grid>`

Here is how it looks

How can I make sure custom grid is aligned with header columns in main grid

Best Answers

Answers

  • nike10nike10 Member ✭✭

    @Nick60 I tried columnspaning on customview but still not not expected result as header and entry columns are not aligned..

    Also below is code link https://github.com/NiketanMhatre/temp

  • nike10nike10 Member ✭✭

    @jezh Thank you . Those little settings made it looks perfect.

  • TPCWareTPCWare ITMember, Insider ✭✭

    @nike10 now you know the power of GitHub repo publishing, it's much easier for others to help you ;-)

  • nike10nike10 Member ✭✭

    @Nick60 No doubt about it.. I have to slice my large chunk code to make that happen but its worth it.. Thanks to you too :smile:

Sign In or Register to comment.