Jump to content


Photo

UniDbGrid - RefreshRecord support

RefreshRecord

  • Please log in to reply
4 replies to this topic

#1 arilotta

arilotta

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 100 posts
  • LocationTrieste, Italy

Posted 11 December 2017 - 10:00 AM

Hi,

I'm using the DevArt components to access the DB (Oracle). They feature the RefresRecord command, a very useful statement that ca be used to refetch just the current record from the DB, without the need to refetch the whole dataset, which can be very time-consuming.

For example, I use it extensively on VCL to get the fields that are updated by some DB triggers, or to get back the changes performed by DB stored procedures.

It seems that this command is not supported by UniGUI, issuing a RefreshRecord on a dataset does not updates the DbGrid, even though the underlying data changes.

Is there something I could use to force the DBGrid to update ?

 

Thank you

Andrea

 


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5010 posts

Posted 11 December 2017 - 10:10 AM

Hi,

UniDBGrid1 -> Options.AutoRefreshRow = True;

UniDBGrid1.RefreshCurrentRow();

Best regards,


  • 0

#3 arilotta

arilotta

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 100 posts
  • LocationTrieste, Italy

Posted 11 December 2017 - 10:27 AM

RefreshCurrentROw did the trick !

Thank you again, it works superbly !

 

Andrea


  • 0

#4 Silvio Santos

Silvio Santos

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationCuiabá/MT

Posted 14 December 2017 - 08:39 PM

UniDBGrid1.Refresh;

Eu uso assim também e funciona normalmente,


  • 0

#5 arilotta

arilotta

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 100 posts
  • LocationTrieste, Italy

Posted 15 December 2017 - 08:15 AM

@Silvio

Hi , Refresh should refresh thw whole grid, while I just need to refresh the current row.

RefreshCurrentRow is much faster !


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users