Firemonkey Grid - How to keep it refreshed ? [Edit]

Hi,

On my form I have a Firemonkey Grid and I have a singular StringColumn.
I am retrieving data from the internet via XML, parsing and filling a Generic Collection list.
The data comes in and I clear the old collection, thus clearing the grid.
I have also added the event OnGetValue and I am using that event to populate my grid from the Collection.

The first time this is run it's perfect, then I search 3 more times (to retrieve seperate data)
and the grid updates with the fresh values. However on the fourth search I have to manually click into the
Grid in order to get it to reflect the new values.

I've tried various methods like Repaint, SetFocus (used a timer to also call these) but it's always the same
result. Clearly I am doing something wrong, but I can not figure out what.

I've followed the excellent blog post here http://bit.ly/wFx2Px (by MonkeyStyler creator) but I am at a loss.

Here is my Grid's OnGetValue code :-
{code}
procedure TfrmMain.grdResultsGetValue(Sender: TObject; const Col, Row: Integer; var Value: TValue);
var
  e: TGDataEntryVideo;

begin
  //
  if Col = 0 then
  Begin
    if fFeed = Nil then Exit;

    e := fFeed.Entries[Row];
    if e = Nil then Exit;

    Value := e.Title;
  End;
end;
{code}

Does anyone have any suggestions ?

EDIT:
I've found that the OnGetValue the second time around is only called AFTER I click the Grid itself, even though I've called Grid.Repaint.

Edited by: Anthoni Gardner on Oct 25, 2012 6:45 PM
0
Anthoni
10/25/2012 5:47:10 PM
embarcadero.delphi.firemonkey 4901 articles. 4 followers. Follow

1 Replies
1231 Views

Similar Articles

[PageSpeed] 41

> {quote:title=Anthoni Gardner wrote:}{quote}
> Does anyone have any suggestions ?
> 
> EDIT:
> I've found that the OnGetValue the second time around is only called AFTER I click the Grid itself, even though I've called Grid.Repaint.

Solved it.
I had to call Grid.UpdateColumns followed by Grid.SetFocus.
0
Anthoni
10/25/2012 8:18:17 PM
Reply:

Similar Artilces:

Firemonkey Grid Control Updated [Edit]
Please check out all the new features in our Firemonkey Grid for Apesuite Beta 6. We could also use feedback on the updated demo as we are finishing up release of the next update. http://arcana.sivv.com/blog/2012/5/23/apesuite-progress-and-new-firemonkey-grid-demo.html New features in this update are: *Cell Spans* - Cells can span x number of columns and y number of rows. In practice, this works very similar to Excel's Merge and Center, though by default we do not alter the alignment when cells span multiple columns. *Formula Support* - Cells now evaluate Excel-style formulas w...

Displaying a grid of JPGs in Firemonkey [Edit]
Hi I have a number of JPEGs in a folder which I want to show on a Grid. With VCL I would have set up a grid and just load them from the directory. The TGrid in Firemonkey only appears to allow me to load information from a database. The number of images varies. I am only interested in it working on a PC or Mac. It doesn't need to work on iOS or Android. Does anyone have any suggestions? Thanks Edited by: aman uppal on Oct 19, 2013 7:49 AM > The TGrid in Firemonkey only appears to allow me to load information from a database. Not true. Basic steps are the following...

Ann: FastReport FMX for Delphi XE3 (FireMonkey 2) and XE2 (FireMonkey) released
Dear friends, Visual report designer is available now on both MS Windows and MAC OS X! Full sources. We can write here full list of possibilities, but it will so long. Let see FastReport VCL and FastReport FMX comparison table: http://www.fast-report.com/en/products/comparison-fast-report-firemonkey-vcl.html And all of this - just now in your hands for business-applications for Mac. Report generator FastReport FMX is the first multiplatform solution for including Business Intelligence into software based on Embarcadero FireMonkey IDE (Delphi for MS Windows and Apple Mac OS X)...

ANN: New Firemonkey Grid Control [Edit]
Apesuite Beta 6 has been released and it now includes a spreadsheet-style TSmartGrid component. http://arcana.sivv.com/blog/2012/5/27/apesuite-beta-6-released.html We would love it if you would check it out. -- Arcana components for Delphi, Intraweb and Firemonkey http://arcana.sivv.com Edited by: Jason Southwell on May 27, 2012 2:59 PM ...

how to refresh/repaint/invalidate a component in firemonkey? [Edit]
Hi, I try to update a component text property periodically ... example: put a TBbutton on a form, add the following code to the OnClick event: {code} procedure TForm1.Button1Click(Sender: TObject); var i : integer; begin for i := 1 to 1000000 do begin if i mod 1000 = 0 then begin button1.Text := inttostr(i); button1.Repaint; // have tried "Realign" too... end; end; end; {code} From my point of view, this routine should update the component every thousand steps... I have tried .realign too... withou...

XE5 FireMonkey IOS and TWebBrowser Refresh? [Edit]
Hi! I'm using TWebBrowser to embed some php pages in my mobile app. How do i refresh those pages like WebBrowser.Refresh in VCL. Also TWebBrowser seems to crash if there is a heavy load of graphics etc. on my php pages so i have to keep the pages quite memory low... It is buggy as hell and the offset of TWebBrowser seems to be wrong... Edited by: Haakon A. Myhra on Oct 15, 2013 4:02 AM ...

ANN: TMS Pack for FireMonkey v1.5 with new TMS Grid for FireMonkey released
We're very proud to announce the availability of TMS Pack for FireMonkey v1.5 at http://www.tmssoftware.com/site/tmsfmxpack.asp that includes our new TMS Grid for FireMonkey and also a new Outlook style navigation bar and advanced edit controls. Screenshot: http://www.tmssoftware.com/site/img/TMSFMXGridCollection_small.png TMS Grid for FireMonkey feature set: - Fully style-able, customizable and architected from the ground up for FireMonkey - Fully cross platform, support for Win32, Win64, Mac OSX, iOS - High performance: handles >500.000 rows, >10.000 columns witho...

Ann: X-platform report generator for Delphi XE3 (FireMonkey 2) and XE2 (FireMonkey) released
Dear friends, Visual report designer is available now on both MS Windows and MAC OS X! Full sources. We can write here full list of possibilities, but it will so long. Let see FastReport VCL and FastReport FMX comparison table: http://www.fast-report.com/en/products/comparison-fast-report-firemonkey-vcl.html And all of this - just now in your hands for business-applications for Mac. Report generator FastReport FMX is the first multiplatform solution for including Business Intelligence into software based on Embarcadero FireMonkey IDE (Delphi for MS Windows and Apple Mac OS X)...

Firemonkey - XE 5 - Mac OS X Firemonkey HD App
My Firemonkey applications have no icon when they run in the dock. What is odd is that when I navigate in the finder to the app bundle to /Users/my_user_id/RADPAServer/scratch-dir I see the icon there, and if I open the app bundle, it contains the .icns file, which seems valid. But the Finder itself, in my iMac running OS X 10.8.5 seems to refuse to show the icon in the dock. Running the app bundle normally (not via RADPASERVER) also results in a broken icon. Note that if I make an icon myself, using the OS X app Icon Composer, and put it in there, it seems valid, but (a) the defau...

Delphi / FireMonkey release components created at runtime [Edit]
Hello, XE6, Win7 Am I right I thinking that if I create a component, such as TImage, at runtime, Delphi automatically releases the memory when the program closes. I declared this: im: TImage; as a TForm variable. Put this in .FormCreate: ReportMemoryLeaksOnShutdown := DebugHook <> 0; This picks up things like TStrokeBrush when I don't run .Free; I then put this in: procedure TFrmScales.Button4Click(Sender: TObject); begin im := TImage.Create(self); im.Bitmap.Assign(I_note.Bitmap); // I_note is a TImage that I put there at design-time im.Pa...

How do you rate you experience programming for IOS in Delphi/Firemonkey [Edit]
Hello: I've been taking a IOS programming course in objective-c/swift with xcode, and while doing my homework assignments I came to the conclusion that this is a very finicky environment, where very often things don't work as expected or there is always some minor UI glitch that has to be fixed or found workarounds for. Just to give you some examples (by far not an exaustive list): a UITableView doesn't align to the top when you use a navigation controller; upon selecting a row in a UITableView some buttons in the row disappear while the row is selected; specifying layout con...

Does Delphi XE5 firemonkey work on current Samsung tablets? [Edit]
I am being told that Delphi XE5 with firemonkey will not work on the current range of Samsung tablets even if they have Android 4 is that true? If so I will be very disappointed having invested thousands of pounds and a few hundred hours to adopt the technology on the promise I can now deploy to Android mobile devices. When I run even the most simple Hello World app I simply get a black screen on my brand new Samsung tablet. I am told it only works on Android devices with a ARMv7 CPU supporting NEON instruction sets. If this is the case developers need to know that I have been told today ...

Firemonkey app from Delphi XE2 -> Dropbox & iCloud [Edit]
Im developing an app for iOS and MacOS Is there any component or a way to connect to Dropbox and iCloud using Delphi XE2? > {quote:title=laureano bonilla wrote:}{quote} > Im developing an app for iOS and MacOS > > Is there any component or a way to connect to Dropbox and iCloud using Delphi XE2 For iCloud, you will need support for both iOS 5.0 and 10.7 Lion. I don't believe XE2 even supports the classes added with iOS 4.x, much less 5.0, although you can parse the iOS 5.0 UIKit and Foundation headers yourself: http://web.me.com/macpgmr/ObjP/Xcode4/iOS_5_Parsing_...

Touch Gestures in Firemonkey 3D application Delphi XE3 MacOS [Edit]
Hi! I'm trying to create a MacOS Firemonkey 3D application with gestures enabled but I can't make it work. I can place a GestureManager on the form but there is no Touch property on the TForm3D object. Then I've tried to create a TLayer3D with a normal TPanel where I was able to set the Touch property but the gestures didn't work although it captured any other mouse movements. Then I've created a separate HD TForm with a GestureManager and with the Touch property set which worked as a stand alone form but whe n I've linked a touch enabled TPanel on the HD TForm to t...

Web resources about - Firemonkey Grid - How to keep it refreshed ? [Edit] - embarcadero.delphi.firemonkey

Firemonkeys - GamesIndustry International
The world's leading games industry website. Get insight from todays industry leaders with news, interviews and analysis of global gaming trends. ...

Firemonkey’s Real Racing 3 To Launch At The End Of February
In September, Apple demoed Firemonkey’s Real Racing 3 at the iPhone 5 event . Three months later and the game has yet to show up in the App Store. ...

EA Games and Firemonkey Bringing Real Racing 3 to Android, Fasten your Seat Belts
Start up your engines race fans, EA Games is teaming up with Firemonkey to bring Real Racing 3 to mobile devices. If you’re a fan of more realistic ...

EA's Firemint and IronMonkey Studios Merge to Become FireMonkeys
... game development studios into one mega-studio in Australia. Firemint and IronMonkeys will be merged into a single studio now known as Firemonkeys ...

News: Firemonkeys announces Real Racing 3
Firemonkeys, a new gaming subsidiary of Electronic Arts born from the merger of FireMint and IronMonkey, has announced the coming release of ...

firemonkeys - iMore
EA has pushed out another impressive update to its equally impressive iOS racer, Real Racing 3, that for the first time brings cars from Ferrari ...

Firemonkeys on Real Racing 3 going free-to-play
... got a hands-on preview of Real Racing 3. We also spoke with Ptolemy Oberin, one of the game’s programmers and project lead at developer Firemonkeys, ...

Real Racing 3 coming in 2012 from Firemonkeys
The first game from recently merged developer Firemonkeys is Real Racing 3 , the developer revealed moments ago during EA's Summer Showcase event ...

Firemonkeys Previews Real Racing 3 for iPhone and iPad
Firemonkeys, the new combined studio from EA combining the IronMonkey and Firemint gaming studios, has announced the development of Real Racing ...

EA Mobile Moves: IronMonkey & Firemint Merge Into “Firemonkeys,” Now Have 50M Players Between
... that it is merging two top mobile game studios, IronMonkey and Firemint , which will fittingly combine to create a new company, called Firemonkeys. ...

Resources last updated: 12/17/2015 12:00:23 AM