3 Answers, 1 is accepted
0
Hi Roshan,
If you need to customize the content, for example to set a localized string to a Label, you can define your own LoadOnDemandTemplate.
For example:
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
If you need to customize the content, for example to set a localized string to a Label, you can define your own LoadOnDemandTemplate.
For example:
<
telerikDataControls:RadListView.LoadingOnDemandItemTemplate
>
<
DataTemplate
>
<
Grid
>
<
Label
Text
=
"Bind this to your localized string"
/>
</
Grid
>
</
DataTemplate
>
</
telerikDataControls:RadListView.LoadingOnDemandItemTemplate
>
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
0
RR
Top achievements
Rank 1
answered on 19 Sep 2018, 10:55 AM
Thank you for the response.
After adding this the "Load more" text appears in a label sort of a component with a yellow background. I couldnt figure out a way to change the ui as well. I would like to keep the same default look and feel and apply the translation. Can this be achieved.?
0
Accepted
Hi Roshan,
Take a look at the RadListView Load On Demand Advanced section of the documentation for a complete description and more examples.
The two templates you can set are:
- LoadOnDemandTemplate (this is the 'load more" button)
- LoadingOnDemandTemplate (this is shown while the next set of items are being fetched)
You have 100% control over the appearance in that template, if you want it to look like the default appearance, you can design your custom template that way.
Here's an example using both templates with a mock static helper class for the translation properties
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Take a look at the RadListView Load On Demand Advanced section of the documentation for a complete description and more examples.
The two templates you can set are:
- LoadOnDemandTemplate (this is the 'load more" button)
- LoadingOnDemandTemplate (this is shown while the next set of items are being fetched)
You have 100% control over the appearance in that template, if you want it to look like the default appearance, you can design your custom template that way.
Here's an example using both templates with a mock static helper class for the translation properties
<
telerikDataControls:RadListView
x:Name
=
"listView"
IsLoadOnDemandEnabled
=
"True"
LoadOnDemand
=
"ListView_LoadOnDemand"
LoadOnDemandMode
=
"Manual"
>
<!-- This is the button -->
<
telerikDataControls:RadListView.LoadOnDemandItemTemplate
>
<
DataTemplate
>
<
Grid
BackgroundColor
=
"Yellow"
Padding
=
"5"
>
<
Label
Text
=
"{x:Static local:MyTranslationHelper.LoadMoreItemsText}"
TextColor
=
"Black"
FontSize
=
"24"
HorizontalOptions
=
"Center"
/>
</
Grid
>
</
DataTemplate
>
</
telerikDataControls:RadListView.LoadOnDemandItemTemplate
>
<!-- This is shown while the items are being fetched -->
<
telerikDataControls:RadListView.LoadingOnDemandItemTemplate
>
<
DataTemplate
>
<
Grid
BackgroundColor
=
"Green"
Padding
=
"5"
>
<
Label
Text
=
"{x:Static local:MyTranslationHelper.LoadingMoreItemsText}"
TextColor
=
"White"
FontSize
=
"24"
HorizontalOptions
=
"Center"
/>
</
Grid
>
</
DataTemplate
>
</
telerikDataControls:RadListView.LoadingOnDemandItemTemplate
>
</
telerikDataControls:RadListView
>
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