title: GridView is not binding C#
body: <p>I am using GridView and trying to bind data to this GridView, but I am facing unusual problem, here is my code : </p>
  
  <p>Method to bind GridView : </p>
  
  <pre><code>private void BindDataSource()
      {
          SqlConnection con = new         SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
          string queryString6 = "";
          string items = "";
          if (lb_add_col.Items.Count &gt; 0)
          {
              foreach (ListItem listItem in lb_add_col.Items)
              {
                  if (listItem.Selected == true)
                  {
                      items += listItem.Text + ",";
                  }
              }
          }
          items = items.TrimEnd(',');
          queryString6 = "SELECT "+items+" from " +ddl_tables.Items[0].Text;
          System.Data.SqlClient.SqlCommand sqlCmd6 = new System.Data.SqlClient.SqlCommand(queryString6, con);
          System.Data.SqlClient.SqlDataAdapter dataAdapter6 = new System.Data.SqlClient.SqlDataAdapter(sqlCmd6);
          System.Data.DataSet dataSet6 = new System.Data.DataSet();
          dataAdapter6.Fill(dataSet6);
          string[] columns = items.Split(',');
          for (int i = 0; i &lt; dataSet6.Tables[0].Rows.Count; i++)
          {
              order.Add(new Orders(columns.Contains("id") ? Convert.ToInt32(dataSet6.Tables[0].Rows[i]["id"]) : 0, columns.Contains("name") ? dataSet6.Tables
              [0].Rows[i]["name"].ToString() : "N/A", columns.Contains("month") ? dataSet6.Tables[0].Rows[i]["month"].ToString() : "N/A", columns.Contains("effiecency") ? Convert.ToInt32(dataSet6.Tables[0].Rows[i]
              ["effiecency"]) : 0, columns.Contains("latitude") ? Convert.ToInt32(dataSet6.Tables[0].Rows[i]["latitude"]) : 0, columns.Contains("longitude") ? Convert.ToInt32(dataSet6.Tables[0].Rows[i]
              ["longitude"]) : 0));
  
          }
  
          this.OrdersGrid.DataSource = order;
          this.OrdersGrid.DataBind();
      }
  </code></pre>
  
  <p>From above method order is showing the data but GridView is not binding.</p>
  
  <p>Button Click event on which I am calling this method : </p>
  
  <pre><code>protected void btn_add_col_Click(object sender, EventArgs e)
      {
  
          Syncfusion.JavaScript.Models.Column sd;
          foreach (ListItem listItem in lb_add_col.Items)
          {
              if (listItem.Selected == true)
              {
  
                  sd = new Syncfusion.JavaScript.Models.Column();
                  if (listItem.Text == "id")
                  {
                      sd.IsPrimaryKey = true;
                  }
                  sd.Field = listItem.Text;
                  sd.HeaderText = listItem.Value;
                  sd.Width = 90;
                  sd.TextAlign = Syncfusion.JavaScript.TextAlign.Right;
                  this.OrdersGrid.Columns.Add(sd);
              }
          }
  
          BindDataSource();
      }
  </code></pre>