发表时间:2007-10-11 13:01:22
//In page_load
vhRecursosSeleccionados.EcoSpace := fEcoSpace;
vhRecursosSeleccionados.Element.AsObject := ArrayList.Create;
//and then
procedure TfrmTarea.btnEjecutar_Click(sender: System.Object; e:
System.EventArgs);
var
dgi:DataGridItem;
cb:CheckBox;
r:TRecurso;
Id:String;
begin
IObjectList(vhRecursosSeleccionados.Element).Clear;
for dgi in dgRecursos.Items do begin
if CheckBox(dgi.FindControl('Chk')).Checked then begin
Id := dgRecursos.DataKeys[dgi.ItemIndex].ToString;
r := ObjectForId(Id).AsObject as TRecurso;
IObjectList(vhRecursosSeleccionados.Element).Add(r.AsIObject);
end;
end;
DataBind;
end;