Click here to Skip to main content
14,827,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am binding a list to gridview using WCF,when i check using breakpoint i am getting the values but i am unbale to see the gridview?

C#
public List<Customer> Getall()
       {
           return cutomerList;
       }

       public static List<Customer> cutomerList = new List<Customer>()
        {
       new Customer {CustomerID = 1, CustomerName="Sujeet",
       Address="Pune", EmailId="test@yahoo.com" },
       new Customer {CustomerID = 2, CustomerName="Rahul",
       Address="Pune", EmailId="test@yahoo.com" },
       new Customer {CustomerID = 3, CustomerName="Mayur",
       Address="Pune", EmailId="test@yahoo.com"}
        };


C#
protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               proxy = new WCFExample.Service1();
               GridView1.DataSource = proxy.Getall();
               GridView1.DataBind();
           }
       }
Posted

Hi,
I hope if you go through below link you will find better solution,

http://forums.asp.net/t/1109165.aspx/1[^]
   
I already checked it,but it dint work.
   

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