// 原來在WW內部已經固定為這個SELECTED字段+計算字段就可以作為CHECKBOX選擇,呵呵 // 不用自己畫啦 procedure TwwDBGrid.ToggleCheckBox(col, row: integer); var dbColumn: integer; value: string; checkBoxOn, checkBoxOff: string; tempField: TField; begin if not isCheckBox(col, row, checkBoxOn, checkBoxOff) then exit;
dbColumn:= dbCol(col); if (DataLink.fields[dbColumn].ReadOnly) then exit;
if (Columns[dbColumn]<>Nil) and (Columns[dbColumn].ReadOnly) then exit;
tempField:=GetColField(dbColumn); if (tempField.calculated) and (lowercase(tempField.fieldName)='selected') then begin if isSelected then UnselectRecord else SelectRecord; end