Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Excessive memory use
Re: Excessive memory use [message #35660 is a reply to message #35657] Sun, 11 March 2012 15:27 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1202
Registered: December 2006
Senior Contributor
IMHO, you need to call SetVirtualCount(). My app WordNet 3.0 browser is an example of using this technique. It is basically a database browser. I'm not sure that a table, I'm trying to scroll, has 150K rows, but it should be close to that. ArrayCtrl initialization code snippet is below.

	warray.AddRowNumColumn("lemma", 80).SetConvert(*Number2Lexeme);
	// Set count.
	{
		String sql;
		Sql stmt(db_session);
		
		sql  = " SELECT max(wordid)";
		sql << " FROM words";

		stmt.SetStatement(sql);
		
		stmt.RunX();
		if (stmt.Fetch())
			warray.SetVirtualCount(stmt[0]);
	}


Regards,
Novo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: Customising GridCtrl Search
Next Topic: GridCtrl: how to set label of an Option
Goto Forum:
  


Current Time: Sat May 15 00:48:04 CEST 2021

Total time taken to generate the page: 0.01874 seconds