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 » How to Xmlize gridctrl
Re: How to Xmlize gridctrl [message #44631 is a reply to message #44624] Wed, 29 April 2015 21:35 Go to previous messageGo to previous message
idkfa46 is currently offline  idkfa46
Messages: 155
Registered: December 2011
Experienced Member
Hi all,
thanks for your helps. I tryed to Xmlize a editable fields storing them in a Vector<Value> .

It works but I have an issue loading my xml. I can add them in a new row but I'm not able to edit an existent one.

here is my code (where geomGrid is my GridCtrl):
virtual void Xmlize(XmlIO xml)
	{
		Vector<Vector<Value> > grid;
		if(xml.IsStoring()){
			for(int r=0; r<geomGrid.GetCount(); r++){
				Vector<Value> row;
				for(int c=0; c<geomGrid.GetColumnCount(); c++){
					row << geomGrid.Get(r,c);
				}
				grid.Add(row);
			}
		}

		ConnettoriCtrl::Xmlize(xml);
		xml
			//("Geometria", 	geomGrid)
			("Geometria", 		grid)
			("Connettore1", 	bullonedl)
			("Connettore2", 	passEdit)
			("Connettore3", 	AresEdit)
			("Connettore4", 	CdRAcciaiodl)
			("Connettore5", 	fukEdit)
			("RopeEffect1",		ropeOption)
			("RopeEffect2",		ArondellaEdit)
		;

		if(xml.IsLoading()){
			for(int r=0; r<grid.GetCount(); r++){
				geomGrid.Add(grid[r]);
			}
		}
	}


it works with geomGrid.Add(grid[r]) but there is no way to edit the existing rows with

...
if(xml.IsLoading()){
       for(int r=0; r<grid.GetCount(); r++){
		geomGrid.Set(r, grid[r]);
       }
}
...


Where am I wrong again?

Regards,
Matteo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Starting a top window hidden?
Next Topic: How does one position the mouse cursor?
Goto Forum:
  


Current Time: Tue May 14 05:04:12 CEST 2024

Total time taken to generate the page: 0.01931 seconds