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
|
|
|
|
|
Re: grid control hidden field sql accept [message #47132 is a reply to message #17489] |
Fri, 16 December 2016 13:53 |
roger
Messages: 9 Registered: August 2016
|
Promising Member |
|
|
I would like to know what events trigger the WhenEndEdit callback. I have a table in which I would like to do some sanity checks whenever a row is visited (whether or not any changes are made). WhenUpdateRow appears to be called only after a CHANGE has been made to a table row. WhenEndEdit is called when I simply left-click on a row. Is there a callback that I can map that will not be called until I press my ENTER key (following any or no actual edits within the row)? Is there any place in the Documentation that describes the circumstances under which each callback is delivered?
|
|
|
Goto Forum:
Current Time: Wed May 08 06:19:00 CEST 2024
Total time taken to generate the page: 0.02722 seconds
|