Jump to content

How do I click a button and jump to the next column?


eduardosuruagy

Recommended Posts

I want to click on a >> button and jump to the next column on the right and when I click on the << jump to the left column.
I was able to do using this form here:

type
     TMyUniDBGrid = class (TUniDBGrid)
   end;

   with TMyUniDBGrid (dbgrid_my) from
   begin
     CurrCol: = TMyUniDBGrid (dbgrid_my) .CrrCol + 1;
   end;

The problem is when you have a scrool on the grid, it does not follow the next column.
I wanted the scrool on the grid to be both to the right and to the left.

Link to comment
Share on other sites

Hi,

Can you try this approach?

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  with UniDBGrid1 do
  begin
    //try
      CurrCol := CurrCol + 1;
      JSInterface.JSCall('scrollTo', [Columns[CurrCol].JSColumn, True]);
    //except
    //end
  end;
end;

 

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