grid and repaint method

hi


if i move by dataset a record i've a bad behaivior in the grid and i think it must be refreshed ... i tried with repaint, update, updatecells, begin..end update ... but nothing ... 

how can i repaint o resync records with dataset ?

bye

Hi, 


The grid should automatically sync and show the new records, are you able to reproduce this with TGrid?

Kind Regards, 
Pieter

hi, i sent u an email yesterday with an image , showing the problem. 

Hi, 


We have investigated this here and were also able to reproduce the refresh issues with a TGrid, 
so it might be possible that the code is missing some crucial methods to succesfully update the grid.

Kind Regards, 
Pieter 

but depend for my code or delphi components ? and what is a workaround ?

Sorry, but if the problem also exists on default TGrid components then its most likely an issue with the code, or with LiveBindings. 


Kind Regards, 
Pieter

NO, with TGrid (with a simple substitution) all go better only invoke Repaint al the end of operations or simple using RowCount to have exact row of tables in insert operations, Check your self and see. Its very strange the behaivior of your Grid its a repaint/refresh problem... BYE

I noticed one important thing : If i use grid before an insert data operations all go fine, after i have a refresh/repaint problems !! 

Another thing : if i use a way 

    bsrDFoodsOrds.DataSet:=Nil;
        DM.dstDFoodsOrds.insert();
    bsrDFoodsOrds.DataSet:=DM.dstDFoodsOrds;

GO fine !!!  can u test if a bug of grid or notifying problem ?


Are you saying that you need to invoke a TGrid Repaint after the code is executed? For TTMSFMXGrid, are you sure you have called consecutive BeginUpdate and EndUpdate statements? 

Yes pieter, its a repaint problem, if u try intructions of my last post all go fine. bsrDFoodsOrds = (TBindSourceDB;). Bye

Hi, 

Are you sure that each BeginUpdate is paired with an EndUpdate? Repaint problems are most likely caused by a mismatch of BeginUpdate and EndUpdate statements. If the UpdateCount > 0 the grid will cause repaint problems. Additionally, if the problem is reproducible in TGrid without a Repaint instruction, then there is also an issue in the code. It's unclear why you need a Repaint instruction, it should not be necessary. 

Are you able to extract this code and reproduce this issue in a new project so we can further investigate this here?

Kind Regards, 
Pieter
Pieter Scheldeman2015-03-30 11:59:21

Pieter i sent u my project ... simple see form frmSum and put my suggestions on delete and insert (try separator -----) event. Another thing : try before to delete or insert something... exit to form and enter again you see grid repainted ... bye 

Dear Mr. Cavalera, 


We have investigated this here multiple times and we were also able to reproduce this with a TGrid, so can you please give us some more information on the following questions:

1) Why do you need a repaint with TGrid? It should not be necessary to execute a Repaint so it might be possible that there is an issue with the code that updates the grid. Please try this again in a separate project.

2) Do you have an equal amount of BeginUpdate and EndUpdate pairs? 

3) Are you able to reproduce this in a separate project with TTMSFMXGrid?

Kind Regards, 
Pieter


solved ... was a dst.DisableControls not enabled at the end ! Excuse me

Bye