Jump to content

Unidbgrid focus a desired cell


Fateh Bouchair

Recommended Posts

procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
 if Key = 13 then Begin
  UniDBGrid1.CurrCol := UniDBGrid1.CurrCol + 1;

  if UniDBGrid1.CurrCol = UniDBGrid1.Columns.Count then Begin
   UniDBGrid1.DataSource.DataSet.Next;
   UniDBGrid1.CurrCol := 0;
  End;

 End;

end;

 

Link to comment
Share on other sites

9 hours ago, Luciano França said:
procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
 if Key = 13 then Begin
  UniDBGrid1.CurrCol := UniDBGrid1.CurrCol + 1;

  if UniDBGrid1.CurrCol = UniDBGrid1.Columns.Count then Begin
   UniDBGrid1.DataSource.DataSet.Next;
   UniDBGrid1.CurrCol := 0;
  End;

 End;

end;

 

I need to check if value of 1st col is 'X' then goto col2 else col3 if I change the value of the 1st col if I do check from dataset 1col show always old value

 

 

Link to comment
Share on other sites

2 hours ago, Fateh Bouchair said:

I need to check if value of 1st col is 'X' then goto col2 else col3 if I change the value of the 1st col if I do check from dataset 1col show always old value

 

 

I didn't understand.

However, I already gave you the path, now you must adapt this code to your needs.

What you need to do is also possible with a dbgrid VCL that doesn't depend on JavaScript.

From a Google search it should find better solutions using VCL that will be possible to use with unidbgrid

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...