Posted on: 6/9/2015 2:45:39 PM | Views : 534

hi i have this problem when i set Gridview Datasource  in code below str and orderid became null values
string str; string orderid; Orderdetails8 o = new Orderdetails8(); StoreClass s = new StoreClass(); protected void Page_Load(object sender, EventArgs e) { GridView1.DataSource = SqlDataSource1; GridView1.DataBind(); StoreClass s = new StoreClass(); for (int index = 0; index < this.GridView1.Rows.Count; index++) { double sum = 0; sum += Convert.ToDouble(this.GridView1.Rows[index].Cells[5].Text) * Convert.ToInt16(this.GridView1.Rows[index].Cells[6].Text); this.GridView1.Rows[index].Cells[7].Text = Convert.ToString(sum); } } but when i set the Datasource in code behind its works fine how to make work with the first way

 Go to the complete details ...