Q:

Why is my DataSet not populating my GridView

I dont know why my data is not showing in my gridview, if i use an sqldatasource with the same query it works.    
cmd.Connection = conn
    conn.Open()
    cmd.CommandText = "SELECT DISTINCT TOP (100) PERCENT dbo.tblConfig_Agent.FirstName, dbo.tblConfig_Agent.LastName, SUM(dbo.tblData_DeviceByDevice.ACDCount) AS Calls, SUM(dbo.tblData_DeviceByDevice.ACDDuration) AS Seconds, dbo.tblConfig_AgentGroup.Name, dbo.tblConfig_Agent.Pkey FROM dbo.tblData_DeviceByDevice INNER JOIN dbo.tblConfig_AgentGroup ON dbo.tblData_DeviceByDevice.FKDevice2 = dbo.tblConfig_AgentGroup.Pkey INNER JOIN dbo.tblConfig_Agent ON dbo.tblData_DeviceByDevice.FKDevice1 = dbo.tblConfig_Agent.Pkey WHERE     (dbo.tblData_DeviceByDevice.MidnightStartDate BETWEEN '4/10/2011' AND GETDATE())GROUP BY dbo.tblConfig_Agent.FirstName, dbo.tblConfig_Agent.LastName, dbo.tblConfig_AgentGroup.Name, dbo.tblConfig_Agent.Pkey ORDER BY Seconds, dbo.tblConfig_Agent.FirstName, dbo.tblConfig_Agent.LastName"
    da.Fill(ds, "test")

    GridView2.DataSource = ds.Tables("test")
    GridView2.DataBind()
    conn.Close()
    UpdatePanel1.Update()

A:

I think you have to review your Dataset filling method.... 
DataAdapter
  // Assumes that connection is a valid SqlConnection object.
string queryString = 
  "SELECT CustomerID, CompanyName FROM dbo.Customers";
SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection);

DataSet customers = new DataSet();
adapter.Fill(customers, "Customers");

