|
发表于 2020-5-18 07:15:02
|
显示全部楼层
itemCreate:
CheckBox A = e.item.FondControl("Aid") as CheckBox
CheckBox B = e.item.FondControl("Bid") as CheckBox
if(A!=null && B!=null) {
string js1= string.Format("if(document.getElementById('{0}').checked) document.getElementById('{1}').checked = true;",B.ClientID, A.ClientID);
B.Attributes["onclick"] = js1;
string js2= string.Format("if(document.getElementById('{0}').checked) document.getElementById('{1}').checked = false;",A.ClientID, B.ClientID);
A.Attributes["onclick"] = js2;
}
|
|