Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. protected void gvSub_RowEditing(object sender, GridViewEditEventArgs e)
  2. {
  3. GridView gvSub = sender as GridView;
  4. GridViewRow row = gvSub.Rows[e.NewEditIndex];
  5.  
  6. Int32 a = Convert.ToInt32(gvSub.DataKeys[e.NewEditIndex][0]);
  7. TextBox1.Text = ((Label)row.FindControl("lblName")).Text;
  8. TextBox2.Text = ((Label)row.FindControl("lblPrice")).Text;
  9. TextBox3.Text = ((Label)row.FindControl("qty")).Text;
  10.  
  11. String Cate = ((Label)gvSub.Parent.FindControl("lblCtName")).Text;
  12. DropDownList1.Items.FindByValue(Cate.ToString()).Selected = true;
  13.  
  14. btnSub.Text = "Update";
  15. e.Cancel = true;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement