I have to create a GridView from a List<>

I have to create a GridView from a List that hold data from an SQL Server table. The. A web service is being using by I think LINQ, and is added to a List<>. This is the code I have so far in the EmployeeManager. How can I populate my GridView with this List<> data. The page load is from EmployeeManager.aspx.cs and my GridView is in EmployeeManager.aspx
I need help like yesterday, thanks

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Psc.Employees.EAdmin
    public class EmployeesAdmin
       private Admin.iAdmin _ws;

       public List<Admin.vwEmployees> GetEmployees(out string x, int i, bool blDisabled)
           return _ws.GetEmployees(out x, i, blDisabled);

Open in new window

protected void Page_Load(object sender, EventArgs e)
	//Create Data Source from List

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ioannis ParaskevopoulosCommented:
Have you tried something like

GridView.Datasource = GetEmployees(args);

Open in new window

Miguel OzSoftware EngineerCommented:
Actually you need both markup and code behind changes as shown here

In the markup you specify in the Columns elements the BoundFields that are loaded from your object property.
In the code behind you called your web service method to assign the returning list to GridView1.Datasource  and then call GridView1.DataBind()

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.