We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with SfNumericTextBox template binding

Thread ID:





146122 Jul 21,2019 06:06 PM UTC Jul 22,2019 12:17 PM UTC Xamarin.Forms 1
Tags: SfListView
Annael Samwel
Asked On July 21, 2019 06:06 PM UTC

I want to use SfNumericTextBox to input data in ListView. The problem is when I change value in one SfNumericTextBox  some other SfNumericTextBox  in a certain row changes. I don't know if is the limitation of Listview of some other reasons.
The following are the the samples of my code:

 <syncfusion:SfListView x:Name="listView" AllowGroupExpandCollapse="True"
                                    ItemSize="50" ItemSpacing="0,2,0,0" AutoFitMode="Height" SelectionBackgroundColor="#DDDDDD"
                        <StackLayout Padding="5" BackgroundColor="#FFFFFF" >
                                <StackLayout  Orientation="Horizontal"    >
                                    <Label    Text="{Binding AccountNO}"    FontSize="12" FontAttributes="Bold" />
                                    <Label    Text="{Binding Shughuli}"     FontSize="12" />
                            <StackLayout     Orientation="Horizontal" HorizontalOptions="EndAndExpand"  >
                                <Label HorizontalTextAlignment="End"   Text="Balance: "    FontSize="10" />
                                <Label HorizontalTextAlignment="End"    Text="{Binding Kiasi, StringFormat=' {0:N}'}" FontAttributes="Bold"    FontSize="10" />
                                <Label HorizontalTextAlignment="End"   Text="{Binding Aina}"   FontSize="10" TextColor="Red" />

                            <StackLayout     Orientation="Horizontal" HorizontalOptions="EndAndExpand"  >
                                <inputLayout:SfTextInputLayout Hint="Amount" 
                 ContainerType="Outlined"  ContainerBackgroundColor="#FFFFFF"  HorizontalOptions="EndAndExpand" WidthRequest="200">

                                    <numerictextbox:SfNumericTextBox x:Name="{Binding ID}"  AutomationId="{Binding ID}"  FontSize="12" FormatString="Tsh" EnableGroupSeparator = "true" HorizontalOptions="EndAndExpand" WidthRequest="200" HeightRequest="50"/>


C# Model Code

 public class RootFundRequest
        public List<RootFundRequestModel> d { get; set; }

    public class RootFundRequestModel
        public string ID { get; set; }
        public string AccountNO { get; set; }
        public string Description{ get; set; }
        public float Amount{ get; set; }
        public string Type{ get; set; }

Jagadeesan Pichaimuthu [Syncfusion]
Replied On July 22, 2019 12:17 PM UTC

Hi Annael, 
Thanks for using Syncfusion product. 
We could able to reproduce the reported issue while using NumerixTextBox inside ListView’s ItemTemplate in our sample. We would like to inform you that reported occurs because of ListView’s implementation behavior. We have implemented SfListView based on Virtualization architecture so ListviewItem will be re-using while scrolling the list which cause reported issue in NumericTextBox. To overcome the reported behavior, you can bind the NumericTextBox value like below. We have attached the sample and code snippet for your reference, please find them from below. 
<syncfusion:SfListView x:Name="listView" AutoFitMode="Height"          
                       ItemsSource="{Binding contactsinfo}"> 
      <syncfusion:SfListView.ItemTemplate > 
                <Grid x:Name="grid" RowSpacing="0"> 
                      <syncfusionNumeric:SfNumericTextBox x:Name="numericTextBox" Grid.Row="1"Grid.Column="0" Value="{Binding ContactNumber}" /> 
Please let us know whether the above solution resolves the issue at your end. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon