locked
Gridview within Listview scrolling problem RRS feed

  • Question

  • Hi,

    I am trying to create a UI which will have a list of items which I want to scroll vertically. each item will again be a list which I want to use grid view and would want it to fill screen.

    If I put the gridview within listview, gridview also scrolls vertically only. If I change the listview also to gridview then the whole thing becomes horizontal which I don't want.

    Any pointers solution would be welcome!!!

    thanks,

    Manish


    Manish

    Wednesday, September 18, 2013 10:31 PM

Answers

  • Hi Manish,

    I tried what you wrote locally, but I do not see there is such problem, My Listview can scroll vertically and my GirdView within the ListView can scrolls horizontally. Or I misunderstand something? Point me out please.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 12:55 AM
    Moderator
  • Hi Manish,

    I simply set the Width and Height for the ListView and GridView:

    <ListView HorizontalAlignment="Left" Height="260" Margin="99,52,0,0" VerticalAlignment="Top" Width="126">
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
            </ListView>

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 7:02 AM
    Moderator

All replies

  • Hi Manish,

    I tried what you wrote locally, but I do not see there is such problem, My Listview can scroll vertically and my GirdView within the ListView can scrolls horizontally. Or I misunderstand something? Point me out please.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 12:55 AM
    Moderator
  •     <Grid>
            <ListView>
                <ListViewItem>
                    <GridView>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        
                    </GridView>
                </ListViewItem>
                <ListViewItem>
                    <GridView>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
                        <GridViewItem>sdfsdfdsf</GridViewItem>
    
                    </GridView>
                </ListViewItem>
            </ListView>
         </Grid>
    the above XAML does the same thing..it puts everything in one vertical list for me. it does not put grid view item horizontally. can you share your xaml ?

    Manish

    Thursday, September 19, 2013 5:14 AM
  • Hi Manish,

    I simply set the Width and Height for the ListView and GridView:

    <ListView HorizontalAlignment="Left" Height="260" Margin="99,52,0,0" VerticalAlignment="Top" Width="126">
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
                <GridView Width="118" Height="130">
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                    <x:String>123123</x:String>
                </GridView>
            </ListView>

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 7:02 AM
    Moderator