Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

ListView.ViewCell Update Changes

$
0
0

I used a ListView control to give an option to vegetables supplier to update their daily rates for items which rates become changed in market today.

here is my code and output, now on pressing an 'Update' button I want to take items that the user changed rate for and update new rates in database.

<ContentPage.Content>

        <ListView x:Name="LV">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                        <StackLayout Orientation="Horizontal">

                            <Label Text="{Binding Item.ItemName}" HorizontalOptions="StartAndExpand" WidthRequest="160" ></Label>
                            <Entry Text="{Binding Price}" Placeholder="rate" HorizontalOptions="StartAndExpand" ></Entry>

                        </StackLayout>



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

        </ListView>
        <Button x:Name="ButLogin" Margin="0,10,0,20" Clicked="ButLogin_Clicked" FontSize="14" TextColor="White"  BorderWidth="1"  BorderColor="White" WidthRequest="80" HeightRequest="26" BackgroundColor="Orange" Padding="0" CornerRadius="15" HorizontalOptions="CenterAndExpand"  Text="Update Today's Rates"/>

    </StackLayout>
</ContentPage.Content>


Viewing all articles
Browse latest Browse all 204402

Trending Articles