I've been trying to fill the grid with the list that returns the method, but I can not get it, could you help me?
public void Rest()
{
RestClient client = new RestClient("http://URLWEBAPI");
var request = new RestRequest("GetData", Method.GET);
request.Timeout = 300000;
request.RequestFormat = DataFormat.Json;
request.AddParameter("Del",btnDel.Text);
request.AddParameter("Al", btnAl.Text);
//request.AddParameter("llaveEmp", llaveEmp);
request.AddParameter("id", id);
var temp = client.Execute<List<string>>(request).Data;
dataGrid.ItemsSource = temp;
dataGrid.RefreshDrawableState();
}
Thanks for using Syncfusion SfDataGrid control.
We have checked your query and our SfDataGrid control will support both List and ObservableCollection. You can get the SfDataGrid demo for Xamarin.Android from below link: http://www.syncfusion.com/downloads/support/directtrac/189152/ze/DataGrid_GettingStartedAndroid1162477819
If you are using JSON data to bind in SfDataGrid, then we must deserialize the JSON data to a bindable format because directly cannot be bound JSON to SfDataGrid. Please refer the below KB link to get more details about SfDataGrid population with JSON data in Xamarin.Android:
https://www.syncfusion.com/kb/7827/how-to-populate-sfdatagrid-with-json-data
If your requirement was differ from this, please share your sample or more details about your requirement, that would be more helpful for us to proceed further.
Regards,
Ashok