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 » U++ SQL » grid control hidden field sql accept
grid control hidden field sql accept [message #17489] Sun, 17 August 2008 20:23 Go to previous message
jaynorwood is currently offline  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


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved]when to reconnect to the sql database?
Next Topic: [sqlite] SqlCurrentTime is inconsistent with TIME definition
Goto Forum:
  


Current Time: Fri Apr 26 15:47:18 CEST 2024

Total time taken to generate the page: 0.03097 seconds