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

Dynamic Rotator Items containing dynamic Grid data

Thread ID:





144210 Apr 24,2019 11:58 PM UTC Apr 29,2019 05:45 AM UTC Xamarin.Forms 3
Tags: SfRotator
Mitch Harhay
Asked On April 24, 2019 11:58 PM UTC


I'm working on a project where the logged in user may have n # of data tables of similar data being pulled from a web service.  The data returned always contains the same data schema but the identifier would be different.  One user may have 1 set of data and another user may have 5 sets of data.

My goal is to dynamically add Rotator items to match the returned data set for the user.

If the user only has 1 data table of data, only one rotator item listing the data in a grid would be shown.  If the user has 5 sets of data, there would be 5 rotator items each containing a grid displaying the data.

Is this possible to achieve using the SfRotator control with the ItemTemplate containing Grids of data that are all uniquely bound?

Thank you,

Muneesh Kumar G [Syncfusion]
Replied On April 25, 2019 12:01 PM UTC

Hi Mitch, 
Greetings from Syncfusion. 
We have analyzed your requirement and we have prepared a sample based on this. We have implemented the SfRotator’s ItemTemplate with SfDataGrid and displayed the same data that bound with view as per the below code snippet.  
In this sample, we have done the following things, 
1. Added SfDataGrid as an ItemTemplate in Rotator and also set binding for the Rotator and DataGrid ItemsSource. Please refer below code snippet for this 
        <local:OrderInfoRepository />
            <Button x:Name="Add"  Clicked="Add_Clicked" Text="Add" HorizontalOptions="Center" VerticalOptions="Center" />
            <rotator:SfRotator x:Name="rotator" ItemsSource="{Binding RotatorCollection,Mode=TwoWay }" NavigationDirection="Horizontal" NavigationStripMode="Thumbnail" NavigationStripPosition="Bottom">
                       <dataGrid:SfDataGrid ItemsSource="{Binding OrderInfoCollection,Mode=TwoWay}" />
2. Added the button click to change the Rotator Items and data of SfDataGrid dynamically. 
Please refer the below screenshot for this 
We request you to try our sample, if this is not your requirement please get back to us with further details. 
Muneesh Kumar G. 

Padmini Ramamurthy [Syncfusion]
Replied On April 29, 2019 05:24 AM UTC

From: Mitch Harhay
Sent: Friday, April 26, 2019 6:28 PM
To: Syncfusion Support <support@syncfusion.com>
Subject: Re: Syncfusion support community forum 144210, Dynamic Rotator Items containing dynamic Grid data, has been updated. 

Thank you - this worked perfectly.

Muneesh Kumar G [Syncfusion]
Replied On April 29, 2019 05:45 AM UTC

Hi Mitch,  
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
Muneesh Kumar G.   


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