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 next 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


Re: grid control hidden field sql accept [message #17519 is a reply to message #17489] Tue, 19 August 2008 12:03 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanks for reporting that. I'm afraid there's no easy fix but I'll try to do something with that.
Re: grid control hidden field sql accept [message #18318 is a reply to message #17489] Mon, 22 September 2008 17:53 Go to previous messageGo to next message
Paco is currently offline  Paco
Messages: 4
Registered: June 2008
Location: Spain
Junior Member
I am tryng to modify the USQLexample in the same way I would like to add a richtTextCtrl to act as modifier of a WHO BORROW field in the borrowed table
Please jaynorwood cand you post your code example for a newbie ?
My goal is to make this field in the table bigger in capacity and to edit it with an RichTextCtrl outside of the gridCTRL to display and edit this field in the table BORROWED.
thanks in advance Smile
Re: grid control hidden field sql accept [message #47132 is a reply to message #17489] Fri, 16 December 2016 13:53 Go to previous message
roger is currently offline  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?
Previous Topic: [solved]when to reconnect to the sql database?
Next Topic: [sqlite] SqlCurrentTime is inconsistent with TIME definition
Goto Forum:
  


Current Time: Tue Apr 16 20:03:48 CEST 2024

Total time taken to generate the page: 0.02444 seconds