Hello...
I have a uniDBGrid with some selected items.
I want to do a routine to execute only the items marked on the Grid.
In normal Delphi it has the command:
For I to DBGrid1.SelectedRows.Count - 1 then
if DBGrid1.SelectedRows.CurrentRowSelected = True then
showmessage('ok');
But I did not find similar in uniGui.
how do I do? Can anyone help?
Thank you
Solved...
procedure TFm_Form.btSaveClick(Sender: TObject);
var
I: Integer;
B : TBookmark;
varAtualiza : boolean;
begin
varAtualiza := False;
if Gr_Grade.SelectedRows.Count > 0 then begin
DataSet.DisableControls;
B := DataSet.GetBookmark;
for I := 0 to Gr_Grade.SelectedRows.Count - 1 do begin
(works)
varAtualiza := True;
end;
end;
if varAtualiza = True then begin
uniMainModule.SQLTempo.Close;
uniMainModule.SQLTempo.CommandText := 'update pokayoke a set a.situation = 0 where a.id=:id';
uniMainModule.SQLTempo.params[0].AsInteger := 1;
uniMainModule.SQLTempo.ExecSQL;
end;
DataSet.EnableControls;
close;
end;