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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...