private void SetValue(string tempObj) { foreach (Control ctrl in this.FLP.Controls) { if (ctrl is RadioButton) { RadioButton rb = ctrl as RadioButton; TxtValObject temp = ctrl.Tag as TxtValObject; if (temp != null && temp.Val.Equals(tempObj)) { rb.Checked = true; } } } }
private void SetValue(string tempObj) { foreach (Control ctrl in this.FLP.Controls) { if (ctrl is CheckBox) { CheckBox cb = ctrl as CheckBox; TxtValObject temp = ctrl.Tag as TxtValObject; if (temp != null) { tempObj = "," + tempObj + ","; string val = "," + temp.Val.ToString().Trim() + ","; if (tempObj.IndexOf(val) > -1) { cb.Checked = true; } } } } }