/// <summary>
/// 单元格的点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gViewActPara_MouseDown(object sender, MouseEventArgs e)
{
GridHitInfo hint = DwgdClient.gridView1.CalcHitInfo(e.X, e.Y); //获取单元格的坐标
if (hint != null)
{
if (hint.InRowCell) //选择非空白处
{
if (hint.Column.FieldName == "Status") //判断选择的单元格是不是复选框
{
int rowHandle = hint.RowHandle; //选择行的索引
string name = this.DwgdClient.gridView1.GetRowCellValue(rowHandle, "Status").ToString(); //获取复选框的值
if (name == "True") //已选中,则设置为不选中
{
DwgdClient.gridView1.SetRowCellValue(rowHandle, "Status", false);
}
else if (name == "False")
{
DwgdClient.gridView1.SetRowCellValue(rowHandle, "Status", true);
}
}
}
}
}