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

LoadOnDemand - disable button

1 Answer 152 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Andrea
Top achievements
Rank 1
Andrea asked on 19 Nov 2018, 10:40 AM

Hi,

I have a DataGrid that load items using the LoadOnDemand manual approach. When there aren't any items to add how can I hide/disable the "Load more" button.

Best regards

 

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 20 Nov 2018, 07:00 PM
Hi Andrea,

Thank you for your interest in Telerik UI for Xamarin controls.

You would need to switch to Automatic LoadOnDemand mode when there are any more items to load.  This could be achieved by binding LoadOnDemandMode to a property in the ViewModel and update it through a LoadMoreData Command.  In the Command you would need to implement some logic to check whether there are more items to load.  I have attached a sample example to demonstrate how exactly this would work. Please download the attachment and give it a try.

Let me know if you have any additional questions or concerns.

Regards,
Yana
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
DataGrid
Asked by
Andrea
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or