protected void gvwMaster_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EditRow") { int id = Convert.ToInt32(e.CommandArgument); RowID = id; mvwForm.SetActiveView(viwAddEdit); Branch branch = branchProvider.Get(id); txtCode.Text = branch.Code; txtName.Text = branch.Name; txtAddress.Text = branch.Address; txtEmail.Text = branch.Email; txtPhone.Text = branch.Phone; txtMerchantCode.Text = branch.MerchantCode; chkIsActive.Checked = branch.IsActive; txtName.Focus(); } }