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 » Community » Newbie corner » GridCtrl help needed
Re: GridCtrl help needed [message #32651 is a reply to message #32650] Tue, 31 May 2011 14:10 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

Hi!

SetCtrlValue doesn't work, because controls are not created yet. They will be created during window opening. To make it work in your case call SyncCtrls before setting control values:
	grid.Add();
            grid.SyncCtrls();
	grid.GoBegin();
	for(int col = 0; col < 10; col++)
		grid.SetCtrlValue(col, "a string");


But the simplest and the best way is to replace SetCtrlValue with Set. In proper time controls will be automatically populated with underlying grid values;

	grid.Add();
	grid.GoBegin();
	for(int col = 0; col < 10; col++)
		grid.Set(col, "a string");
 
Read Message
Read Message
Read Message
Previous Topic: How to internet enable a serial device
Next Topic: GridCtrl out-of-bound crash with test case
Goto Forum:
  


Current Time: Fri Aug 22 10:50:03 CEST 2025

Total time taken to generate the page: 0.06310 seconds