2.页面上添加OnCheckedChanged="OnCheck"
1
public
void
OnCheck(Object sender,System.EventArgs e)
2 {
3 // 自定义选择事件--页面上添加OnCheckedChanged="OnCheck"
4 CheckBox chkSelect = (CheckBox)sender;
5 DataGridItem dgi = (DataGridItem)chkSelect.Parent.Parent;
6 int KeyID = int .Parse( this .dg.DataKeys[dgi.ItemIndex].ToString());
7 DataRow[] sRow = cDecisionSearch.Meet_DecisionList.Select( " MeetingDecisionid= " + KeyID);
8
9 if (sRow.Length > 0 )
10 {
11 if (chkSelect.Checked)
12 {
13 sRow[ 0 ][ " FlagBool " ] = true ;
14 }
15 else
16 {
17 sRow[ 0 ][ " FlagBool " ] = false ;
18 }
19 }
20 }
21
2 {
3 // 自定义选择事件--页面上添加OnCheckedChanged="OnCheck"
4 CheckBox chkSelect = (CheckBox)sender;
5 DataGridItem dgi = (DataGridItem)chkSelect.Parent.Parent;
6 int KeyID = int .Parse( this .dg.DataKeys[dgi.ItemIndex].ToString());
7 DataRow[] sRow = cDecisionSearch.Meet_DecisionList.Select( " MeetingDecisionid= " + KeyID);
8
9 if (sRow.Length > 0 )
10 {
11 if (chkSelect.Checked)
12 {
13 sRow[ 0 ][ " FlagBool " ] = true ;
14 }
15 else
16 {
17 sRow[ 0 ][ " FlagBool " ] = false ;
18 }
19 }
20 }
21