gridview datasource issue
Posted
by xrx215
on Stack Overflow
See other posts from Stack Overflow
or by xrx215
Published on 2010-04-02T17:16:37Z
Indexed on
2010/04/02
17:43 UTC
Read the original article
Hit count: 229
I am calling a webservice as follows.I have to display name, description and url in the gridview using this webservice.
using sdi.amiller_v_vista;
sdi.amiller_v_vista.DDCControl proxy1 = new sdi.amiller_v_vista.DDCControl();
sdi.amiller_v_vista.DDCReturnGetAll ret = proxy1.GetAllDDCs(x, y);
foreach (sdi.amiller_v_vista.DDCInfo2 di2 in ret.DDCs)
{
GridView1.DataSource = I have to assign the di2 values to gridview datasource
//GridView1.DataSource = ret.DDCs[i] throws an error Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource.
GridView1.DataBind();
}
From WSDL metadata i can get the follwing info
public DDCReturnGetAll GetAllDDCs(Guid accountId, Guid authToken);
public class DDCReturnGetAll : DDCReturnBase
{
public DDCReturnGetAll();
public DDCInfo2[] DDCs { get; set; }
}
public class DDCInfo2
{
public DDCInfo2();
public BrandingType brandingType { get; set; }
public string ChargebackName { get; set; }
public string CollectorName { get; set; }
public string Description { get; set; }
public string URL { get; set; }
}
© Stack Overflow or respective owner