title: Property accessor 'Title' on object x threw the following exception:'Object reference not set to an instance of an object
body: <p>I am getting this error on my DataBind Command I am trying to populate a gridview from a List using asp and c#.
  The Scenario is repeater populates category links on sidebar, based on selection will populate a gridview in the main div. It worked fine when I used a dataset as my datasource but this scenario I am using generics and I don't know where the error is coming from. The List gets populated just cant databind it</p>
  
  <pre><code>public partial class Products : System.Web.UI.Page
  {
      string ItemNumber;
      string ItemDescription;
      string  PrePrice;
      string Size;
  
      protected void Page_Load(object sender, EventArgs e)
      {
          if (!IsPostBack)
          {
              PopCategories();
  
          }
      }  
  private List&lt;Products&gt; GetCategoryDetails(string HiddenField1)
      {
          DataTable table = new DataTable();
          table = new BizLayer().grabdata(HiddenField1);
  
          List&lt;Products&gt; list = new List&lt;Products&gt;();
          foreach (DataRow dr in table.Rows)
          {
              Products products = new Products();
              products.ItemNumber = dr["Item #"].ToString();
              products.ItemDescription = dr["Item Description"].ToString();
              products.PrePrice = dr["Pre Price"].ToString();
              products.Size = dr["Size"].ToString();
              list.Add(products);
          }
          return list;
      }
   private void PopDetails()
      {
          DetailsGridView.DataSource = GetCategoryDetails(HiddenField1.Value);
  </code></pre>
  
  <p><strong>Error Here</strong>
                DetailsGridView.DataBind();</p>
  
  <pre><code>    }  
  
    protected void Repeater_ItemCommand(object source, RepeaterCommandEventArgs e)
      {       
          //Get Command Arguement from repeater OnItemCommand
          if (e.CommandName == "cmd")
          {
              HiddenField1.Value = (e.CommandArgument).ToString();             
  
               GetCategoryDetails(HiddenField1.Value);
               PopDetails();
          }            
      }
  
      protected void DetailsGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
      {
  
              DetailsGridView.PageIndex = e.NewPageIndex;
              //  DataSource  
              DetailsGridView.DataSource = GetCategoryDetails(HiddenField1.Value);
  
              DetailsGridView.DataBind();            
      }
  
   &lt;asp:GridView ID="DetailsGridView" AllowPaging="true" PageSize="3" CssClass="dataGrid" 
    RowStyle-  CssClass="chartItemStyle" AlternatingRowStyle-CssClass="chartAlternatingItemStyle" 
    HeaderStyle-  CssClass="chartHeaderStyle" runat="server"   OnPageIndexChanging="DetailsGridView_PageIndexChanging"&gt;   &lt;/asp:GridView&gt;
  </code></pre>