Home » U++ Library support » U++ SQL » grid control hidden field sql accept  
	
		
		
			| grid control hidden field sql accept [message #17489] | 
			Sun, 17 August 2008 20:23   | 
		 
		
			
				
				
				
					
						  
						jaynorwood
						 Messages: 7 Registered: May 2008 
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		I'm using the 2008.1 mingw download, hacking the HomeBudget 
code, which is a very nice example, thank you very much.   
 
I added a hidden column to add a RichEdit control as the 
editor, and a RichTextView as the display, both of which 
I'm bringing up in a second window.  All of this also 
works very well, thank you again. 
 
		RichEdit ertv; 
		RichTextView rtv; 
 
	money.AddColumn(NOTES, "Notes").Edit(ertv).Hidden(); 
 
(with  RichEdit ertv;) 
 
However, I ran into a problem where the accepted row data would not update the sql database if only the hidden control data 
is modified.  If one of the visible column entries was modified, then the entire row data was saved correctly, including the hidden row data.  
 
I debugged this and found that GridCtrl::IsModifiedRow() 
was not returning true.  After several hours of trying 
to figure a way to get it to recognize that the hidden 
data had been modified, I finally just added 
 
		void SetModifiedRow()    { row_modified++; } 
to GridCtrl.h at line 1177, and then called it from a callback. 
 
	money.WhenEndEdit = THISBACK(EndEditNotes); 
 
This seems to work now, but I'd like to know if there are  
any other accepted ways of dealing with this issue. 
Thanks, 
Jay Norwood 
 
 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 13:18:01 CET 2025 
 Total time taken to generate the page: 0.03956 seconds 
 |