private void ChangeCheckBoxStatus(bool checkedState) { CheckBoxField field1 = (CheckBoxField)Grid1.FindColumn("CheckBoxField1"); CheckBoxField field2 = (CheckBoxField)Grid1.FindColumn("CheckBoxField2"); CheckBoxField field3 = (CheckBoxField)Grid1.FindColumn("CheckBoxField3"); foreach (int rowIndex in Grid1.SelectedRowIndexArray) { field1.SetCheckedState(rowIndex, checkedState); field2.SetCheckedState(rowIndex, checkedState); field3.SetCheckedState(rowIndex, checkedState); } }
protected void Grid1_RowClick(object sender, FineUI.GridRowClickEventArgs e) { bool checkedState = false; if (new List <int>(Grid1.SelectedRowIndexArray).Contains(e.RowIndex)) { checkedState = true; } CheckBoxField field1 = (CheckBoxField)Grid1.FindColumn("CheckBoxField1"); CheckBoxField field2 = (CheckBoxField)Grid1.FindColumn("CheckBoxField2"); CheckBoxField field3 = (CheckBoxField)Grid1.FindColumn("CheckBoxField3"); field1.SetCheckedState(e.RowIndex, checkedState); field2.SetCheckedState(e.RowIndex, checkedState); field3.SetCheckedState(e.RowIndex, checkedState); }
protected void Grid1_RowClick(object sender, FineUI.GridRowClickEventArgs e) { //Alert.ShowInTop(String.Format("你点击了第 {0} 行(单击)", e.RowIndex + 1)); bool checkedState = false; if (new List <int>(Grid1.SelectedRowIndexArray).Contains(e.RowIndex)) { checkedState = true; } CheckBoxField field1 = (CheckBoxField)Grid1.FindColumn("CheckBoxField1"); CheckBoxField field2 = (CheckBoxField)Grid1.FindColumn("CheckBoxField2"); CheckBoxField field3 = (CheckBoxField)Grid1.FindColumn("CheckBoxField3"); // Grid1.Rows[e.RowIndex].States[field1.ColumnIndex] = true; field1.SetCheckedState(e.RowIndex, checkedState); field2.SetCheckedState(e.RowIndex, checkedState); field3.SetCheckedState(e.RowIndex, checkedState); }