Click here to Skip to main content
15,886,617 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friend
i have a object for the list
var objlist = JsonConvert.DeserializeObject<AIRNRCPartList>(Result);

which is coming from the API
and i want to display into a ListView.
if single item of a list is coming properly but i am not able to display a list from this object
PM_PartDescription = objlist.Result.List[0].PM_PartDescription.ToString();

please help and tell me how to display a list view

What I have tried:

string Result = await _workOrderApiHelper.GetMaterial(PartInput);
                      
                if (!string.IsNullOrEmpty(Result))
                {



                var objlist = JsonConvert.DeserializeObject<AIRNRCPartList>(Result);
                
                PM_PartDescription = objlist.Result.List[0].PM_PartDescription.ToString();
Posted
Updated 1-Mar-23 20:04pm

1 solution

Use teh collection as the DataSource for a data-aware grid based control - the Xamarin.Forms Grid - Xamarin | Microsoft Learn[^] for example.
 
Share this answer
 
Comments
faizy001 2-Mar-23 2:09am    
sir i have seen this example but this time i want to Bind a List or collection
OriginalGriff 2-Mar-23 3:36am    
So you didn't bother reading it, or following any links then?
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/bindable-layouts

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900