Want to add Swipe in single direction with multiple columns

3 posts, 0 answers
  1. amit
    amit avatar
    1 posts
    Member since:
    Aug 2017

    Posted 09 Aug 2017 Link to this post

    Hi,

     

    I am trying to create swipe functionality in listview, The challenge is I have to add 3 columns in left swipe. right now what is happening that I am getting one column on right side and one columns in left side. Please help

     

    Regards,

    Amit

  2. Ganesh
    Ganesh avatar
    11 posts
    Member since:
    Jun 2017

    Posted 10 Aug 2017 in reply to amit Link to this post

    Hi Amit,

     

    You can use the Property of Offset to change the directions of swipe on listview Item.

    Below is the example code

     <telerikDataControls:RadListView  x:Name="listView"
                                             SelectionMode="Multiple"
                                             ItemsSource="{Binding Items}"
                                             IsItemSwipeEnabled="True" SwipeOffset="0,0,150,0">

              <telerikDataControls:RadListView.ItemSwipeContentTemplate>
                    <DataTemplate>
                        <Grid ColumnSpacing="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>

                                 <ColumnDefinition Width="Auto"/>

                            </Grid.ColumnDefinitions>
                            <Grid BackgroundColor="Green" Grid.Column="1">
                                <Button Text="Approve" Image="approve.png" Clicked="OnApprove"
                                        ContentLayout="Top"  HorizontalOptions="CenterAndExpand"/>
                            </Grid>
                            <Grid BackgroundColor="Red" Grid.Column="2">
                                <Button Text="Reject" Image="reject.png" Clicked="OnReject" 
                                        ContentLayout="Top" HorizontalOptions="CenterAndExpand"/>
                            </Grid>
                        </Grid>
                    </DataTemplate>
                </telerikDataControls:RadListView.ItemSwipeContentTemplate>

    </telerikDataControls:RadListView>

  3. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 14 Aug 2017 Link to this post

    Hi Amit,

    As Ganesh suggested, working with the SwipeOffset in combination with a proper ItemSwipeContentTemplate should be helpful in your situation. Please give it a try and update the thread whether this helped. Otherwise, sharing more information on your scenario will be appreciated.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top