Synchronize FDQuery and IWjQDBGrid

<< Click to Display Table of Contents >>

Navigation:  Forum >

Synchronize FDQuery and IWjQDBGrid

Forum link

 


 

01-18-2022, 08:40 AM:

 

Hello!

 

How do i synchronize the dataset with the grid? I want the current record in the dataset always to be the selected row in the grid.

 

I want it to work both ways, if i click in the grid the dataset should select a new current row, and if I programatically change the current row in the dataset (Eg. FDQuery.Next) the grid should be updated.

 

I also want the grid to always show the selected row! I tried  Options = [goViewRecords, goGridView, goHoverRows, goIgnoreCase, goScroll, goSortable, goZebraStriped, goRowSelect], but if I click on a already selected row in the grid the selection disappeares.

 

Best regards, Mikael

 

 

 


 

01-25-2022, 01:00 PM:

 

Anyone who can help me with this? How do I reflect the dataset with the IWjQDBGrid! I want the selected row in the grid to always be the same as the current record in the dataset!

 

One week and not a single reply. Isn't it possible to do?

 

Best regards, Mikael

 


 

02-14-2022, 06:14 AM:

 

You need to create an event handler and deal with this in code.

 

Have in mind that the web does not work like VCL/Desktop. The overhead of keeping this in sync is enormous and that's not how you should do it, unless you have a very specific need...

 

Can you detail your requirements a little more?