c# - Population of TableView Data in Xamarin -
I have successfully received the data from the URL and it is specified in my customer dictionary and I have my output to each customer object though Since I'm quite new on this forum, I could not be able to populate the data on tableview cells. I've attached my code.
Private IEnumerable & lt; IDictionary & lt; String, Object & gt; & Gt; Customers; Public MyDataServices () {InitializeComponent (); Startup data service (); GetDataFromOdataService (); Foreign currency (different customers in customers) {System.Diagnostics.Debug.WriteLine ((string) customers ["contact name"]); // Populate data on the table view) padding = new thickness (10, 20, 10, 10); Content = New StackLayout () {children = {TableView}};
Considering customer examples contactName and ContactPosition fields, these basic details make TextCell s with those details and adds them to the table view. // Create a TableSection section to keep the cells cells = new tablechets ("customer"); Foreign Currency (Different Customers In Customer) {System.Diagnostics.Debug.WriteLine (String) Customers ["Contact Name"]); // Populate data on tableView name (=) Customer ["ContactName"]; Var position = (string) client ["contactpathy"] var cell = new textile {text = name, expansion = status}; section.Add (cell); } // Add the view to the table view table. View. Route. Add (section); Then you add tableview to your layout Xamarin Docs has information < / Html>
Comments
Post a Comment