Using datatable with MVC 3 and WebGrid
===

I am writing my first internet application with MVC 3 but I'm having issues with getting the data to bind to the Webgrid.  I am pulling the data using a stored procedure and storing it in a datatable in the model.  I can't bind directly using the datatable so I am converting it to an EnumerableRowCollection, but I can't seem to get it to work.

I've seen examples where they list out each field in the model and I think that is a ridiculously way to have to do this.  Also, the field returned for this report or dynamic based on what they have chosen to see and the order they see it in.

In my model:


    namespace ShipStatReportsModels.Models
    {
        public class ShipStatData
        {
            public EnumerableRowCollection GetReportData()
            {
                SqlDataAdapter da = new SqlDataAdapter();
                DataTable dt = new DataTable();
                try
                {
                    using (SqlConnection _SqlConnection = new SqlConnection(ConfigurationManager.AppSettings["ADONETHorizoninetuser"]))
                    {
                        using (SqlCommand cmd = new SqlCommand("UP_ShipStatReports_DataPresentation", _SqlConnection))
                        {
                            cmd.CommandTimeout = 120;
                            cmd.CommandType = System.Data.CommandType.StoredProcedure;
    
                            cmd.Parameters.AddWithValue("@Contact_id", 43135);
                            cmd.Parameters.AddWithValue("@Contact_Server_ID", 17);
                            cmd.Parameters.AddWithValue("@Report_Id", 1);
    
                            da.SelectCommand = cmd;
                            da.Fill(dt);
                        }
                    }
    
                }
                catch (Exception ex)
                {
                    throw ex;
                }          
                
                return dt.AsEnumerable();
            }
    
        }
    }


In my collection:

    public ActionResult Reports()
    {
        ShipStatData modelObject = new ShipStatData();
        EnumerableRowCollection resultSet = modelObject.GetReportData();

        return View(resultSet);
    }



In my view:

    @{
        
        ViewBag.Title = "Reports";
    }
    @model ShipStatReportsModels.Models.ShipStatData
    
    @{
        var Grid = new WebGrid(@Model);
    }
    
    
    <h2>Reports</h2>
    
    <div>
    @Grid.GetHtml(
        tableStyle: "grid",
        headerStyle: "head",
        alternatingRowStyle: "alt"
        )
    )
    </div>

But I get the following error:

Compilation Error 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.Helpers.WebGrid.WebGrid(System.Collections.Generic.IEnumerable<dynamic>, System.Collections.Generic.IEnumerable<string>, string, int, bool, bool, string, string, string, string, string, string, string)' has some invalid arguments

Any ideas would be appreciated.  Thanks!