Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

listview data is not getting scrolled horizontally

DemoCloudDemoCloud Member ✭✭✭

Hello,
Below is the code the display the user registration details using listview in xamarin forms, but here the columns till username are only displayed ,the listview scroll function is not working ,please help. the scroll function required here is in both directions like vertical and horizontal
Thanks

<ListView.HeaderTemplate>


<Grid.RowDefinitions>

                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="150" />
                            <ColumnDefinition Width="50" />
                        </Grid.ColumnDefinitions>
                            <Label Grid.Column="0"  Text="Id" TextColor="Blue" />
                            <Label Grid.Column="1"  Text="Role" TextColor="Blue" />
                            <Label Grid.Column="2" Text="Name"  TextColor="Blue"/>
                            <Label Grid.Column="3"  Text="Username"  TextColor="Blue"/>
                            <Label Grid.Column="4" Text="Password" TextColor="Blue" />
                            <Label Grid.Column="5"  Text="Email" TextColor="Blue" />

                        </Grid>
                    </DataTemplate>
                </ListView.HeaderTemplate>

                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Grid  HorizontalOptions="CenterAndExpand">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="150" />


                            </Grid.ColumnDefinitions>
                                <Label Grid.Column="0" Text="{Binding userId}" />
                                <Label Grid.Column="1" Text="{Binding rolename}" />
                                <Label Grid.Column="2" Text="{Binding name}" />
                                <Label Grid.Column="3" Text="{Binding username}" />
                                <Label Grid.Column="4" Text="{Binding password}" />
                                <Label Grid.Column="5" Text="{Binding email}" />

                        </Grid>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

Answers

Sign In or Register to comment.