Jump to content

[SOLVED] Command substitute for CurrentRowSelected


Alessandro

Recommended Posts

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;
 

 

Link to comment
Share on other sites

Hi,

 

Sorry maybe I did not understand you correctly, but UniDBGrid ->.SelectedRows property already "includes" marked records

 

Have you seen this demo for example?:

\FMSoft\Framework\uniGUI\Demos\Desktop\GridMultiSelect
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...