Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl empty cells pasted from Excel  
	
		
		
			| GridCtrl empty cells pasted from Excel [message #17362] | 
			Sat, 09 August 2008 01:11   | 
		 
		
			
				
				
				  | 
					
						  
						koldo
						 Messages: 3453 Registered: August 2008 
						
					 | 
					Senior Veteran  | 
					 | 
		 
		 
	 | 
 
	
		Hello all 
 
First of all thanks to Ultimate++ developers because this is something I wait many time ago. It is simple, original and powerful! 
 
Second the question: I found that when pasting a row on a GridCtrl copied from excel or notepad the empty cells are simply not copied.  
 
For example: 
 
Copied from Excel:  Hello/(empty)/World 
Pasted in GridCtrl: Hello/World/(empty) 
 
However if this is copied from GridCtrl its is pasted to perfectly.     
 
Surfing through the code I have found that in GridCtrl.cpp, function void GridCtrl::Paste(int mode), line 791, on 
 
   ... 
   for(int i = 0; i < lines.GetCount(); i++) 
   { 
    Vector<String> cells = Upp::Split(lines[i], '\t'); 
    for(int j = 0; j < cells.GetCount(); j++) 
       ... 
 
If I put Upp::Split(lines[i], '\t', false); instead, the row is copied Ok including empty cells. 
 
Another comment: When copying to the clipboard from GridCtrl it seems is included a empty cell at the end (an extra '\t' character). 
 
Best regards 
 
 
 
 
		
		
  Best regards 
IƱaki
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
	
	  | 
	 | 
	
		GridCtrl empty cells pasted from Excel
		By:  koldo on Sat, 09 August 2008 01:11  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Mon, 25 August 2008 12:31  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  unodgs on Mon, 25 August 2008 14:37  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  unodgs on Mon, 25 August 2008 14:51  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  unodgs on Mon, 25 August 2008 15:07  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Mon, 25 August 2008 22:02  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  unodgs on Mon, 25 August 2008 23:03  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Tue, 26 August 2008 11:16  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  unodgs on Tue, 26 August 2008 12:08  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Tue, 26 August 2008 12:07  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Tue, 26 August 2008 16:11  
	 | 
 
	  | 
	 | 
	
		Re: GridCtrl empty cells pasted from Excel
		By:  koldo on Tue, 26 August 2008 16:24  
	 | 
  
Goto Forum:
 
 Current Time: Tue Nov 04 17:13:52 CET 2025 
 Total time taken to generate the page: 0.06514 seconds 
 |