This is a migrated thread and some comments may be shown as answers.

ListView not showing up

3 Answers 372 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luc
Top achievements
Rank 1
Luc asked on 17 Feb 2017, 01:44 AM

HI,

I just implement a Telerik List View, followed all the steps on 
http://docs.telerik.com/devtools/xamarin/controls/listview/getting-started/listview-getting-started

all compiles no problems, however the list view didn't show up.

 

My code is exactly copied for the code sample on your instruction page.  except I removed BindingContext bit from the xaml , because I use MVVM which automatically bind the view model to xaml.

<telerikDataControls:RadListView ItemsSource="{Binding Source}">
        <!--<telerikDataControls:RadListView.BindingContext>
          <local:PlanEditorPageModel />
        </telerikDataControls:RadListView.BindingContext>-->
        <telerikDataControls:RadListView.ItemTemplate>
          <DataTemplate>
            <telerikListView:ListViewTemplateCell>
              <telerikListView:ListViewTemplateCell.View>
                <Grid>
                  <Label Margin="10" Text="{Binding Name}" />
                </Grid>
              </telerikListView:ListViewTemplateCell.View>
            </telerikListView:ListViewTemplateCell>
          </DataTemplate>
        </telerikDataControls:RadListView.ItemTemplate>
      </telerikDataControls:RadListView>

 

I also tried the Chart control, which didn't show up as well? What am I missing? 

 

3 Answers, 1 is accepted

Sort by
0
Luc
Top achievements
Rank 1
answered on 17 Feb 2017, 02:03 AM

working now!

I actually need to put this line outside of the namespace!

 

[assembly: ExportRenderer(typeof(Telerik.XamarinForms.DataControls.RadListView), typeof(Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer))]

0
san
Top achievements
Rank 1
answered on 10 Jan 2018, 01:17 PM

can you tell me where to put that ExportRenderer. As i am also not able to see list view. Also i used trial version, so does it affect anything?

 

Thanks.

0
Lance | Manager Technical Support
Telerik team
answered on 10 Jan 2018, 07:04 PM
Hi San,

You no longer need to declare the renderers, or call TelerikForms.Init(), after version 2017.1 . We now do this internally to make this easier for you (please see this doc article for more info).

Since you haven't shared your code, I can't tell exactly what's wrong, but a very common cause for not seeing the radListView is that you put it inside a StackLayout. Instead put the RadListView inside a Grid.

If you need RowDefinitions, than make sure the RadListView is inside a RowDefinition that has a height of star.

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
 
    <OtherContent Grid.Row="0" />
 
    <RadListView Grid.Row="1"/>
</Grid>

If you're still having trouble, please open a support ticket here and share your code so that we can investigate directly.

Regards,
Lance | Tech Support Engineer, Sr.
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
Tags
General Discussions
Asked by
Luc
Top achievements
Rank 1
Answers by
Luc
Top achievements
Rank 1
san
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or