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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add sfrating to a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

125997 Sep 16,2016 11:59 AM UTC Sep 20,2016 01:10 PM UTC Xamarin.Forms 1
loading
Tags: SfRating
Arturo Pérez García
Asked On September 16, 2016 11:59 AM UTC

Hi all,

I have the following xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
             xmlns:rating="clr-namespace:Syncfusion.SfRating.XForms;assembly=Syncfusion.SfRating.XForms"
             x:Class="WSTest2.ValorarServicio">
  <ScrollView>
    <StackLayout Spacing="5" Padding="10" VerticalOptions="FillAndExpand">
      <Grid  x:Name="gridEncuesta" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" ColumnSpacing="5" RowSpacing="15" >
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="3*" />
          <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions> 
        <Grid.RowDefinitions>
          <RowDefinition Height="100" />
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="lblDescripcionEncuesta" Font="Bold,15" VerticalOptions="CenterAndExpand" />
      </Grid>

    </StackLayout>
  </ScrollView>
</ContentPage>
And in my code behind I Dynamically charge sfratings follows 
        protected override async void OnAppearing()
        {
            UserDialogs.Instance.ShowLoading("Recuperando la encuesta de la Solicitud [" + this.aviso.NUMERO + "].", MaskType.Black);
            string Encuesta_List = await GetEncuestaRealizada(this.aviso.ID_ENCUESTA_REALIZADA);
            lblDescripcionEncuesta.Text = encuestacabecera.TEXTO;
            int ActualRow = 0;
            foreach (Encuesta_Realizada_Detalle encuestarealizadadetalle in encuestarealizadadetallelist)
            {
                ActualRow++;
                gridEncuesta.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
                gridEncuesta.Children.Add(new Label
                {
                    Text = "XXX-" + ActualRow,
                    HorizontalOptions = LayoutOptions.StartAndExpand,
                    VerticalOptions = LayoutOptions.Center,
                    FontAttributes = FontAttributes.Bold
                }, 0, ActualRow);

                gridEncuesta.Children.Add(new SfRating
                {
                    Value = encuestarealizadadetalle.VALOR,
                    ItemCount = 5,
                    ItemSpacing = 7,
                    ItemSize = 25,
                    ReadOnly = true,
                    HorizontalOptions = LayoutOptions.EndAndExpand,
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                }, 1, ActualRow);
            }
            UserDialogs.Instance.HideLoading();
        }
The only result I load a row, when the list I have 4 elements.
If I run the same process without loading the sfrating control works properly.
Someone could help me.
Thank you.

Sorry for my English is very bad.

Chozarajan Pandiyarajan [Syncfusion]
Replied On September 20, 2016 01:10 PM UTC

Hi Arturo,

Thank you for contacting Syncfusion support.

We were unable to reproduce the reported problem at our end. And we have achieved your requirement by modifying your codes please download the same from the following link.

Link: http://www.syncfusion.com/downloads/support/forum/125997/ze/RatingTest463671671 

If your requirement is different from the above please modify the sample and update us with more details. That will help us to assist you further.

Regards,
Chozarajan P. 


CONFIRMATION

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.

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

;