Wednesday, 1 July 2015

Fetch to GridView



 public void AddTogridsupply()//fetch to supplybranchdetails to  gridview
        {
            SqlDataReader sdr;
          cmd = new SqlCommand("[selectsupplybranchdetails]", con.serverConnection());
            cmd.CommandType = CommandType.StoredProcedure;
            sdr = cmd.ExecuteReader();
   if (sdr.HasRows == true)
            {

                while (sdr.Read())
                {
                    string[] array = new string[10];
                    gdvsupply.DataSource = sdr;
                    gdvsupply.DataBind();

                }

            }
}

No comments:

Post a Comment