chriscripps
Posts: 30
|
| Posted: 07/04/2009, 11:40 AM |
|
HI,
I have read through the forums and not found something to directly address my problem. In my editable grid, I have 30 empty rows that are only revealed one at a time if the user clicks on an add a line button based on the Yes example of the master detail example of an order.
I would like to have my users see a default value, and be able to change it if needed. If not changed, I would like not to submit 30 rows with the default value.
To set the default value, I have used a before row show event to set it. I thought I could then use an event to unset it (set it to be null) if another box was not filled in. I have tried to do this in the on validate event for the listbox as well as for the other box that is being tested. I have tried to do this in the before build insert. I have tried in the on validate row and the grid on validate event. None of these seem to work.
The other examples seem to say these should work to set it if not filled in, but not to unset it if filled in as a default.
Should I be able to do this? Any hints would be appreciated,
Thanks,
Chris
|
 |
 |
ckroon
Posts: 869
|
| Posted: 07/04/2009, 4:30 PM |
|
How about putting the Default Value as CCGETFROMGET("myurl","")
And have the URL present when they get to that page?
_________________
Walter Kempees...you are dearly missed. |
 |
 |
chriscripps
Posts: 30
|
| Posted: 07/06/2009, 6:54 PM |
|
ckroon,
I guess I am not following what you are suggesting. I have the default vaues fine. I can set them in the before show event and they show up perfectly. I do not see how the CCGetFromGet would allow me to show them but to not enter them as a blank row in the database (or give me an error saying I needed the required field) by resetting them to "" in the end, before inserting the row?
What I have done as a work around is I put the default values in a label above the list and text boxes in red typeface. In the BeforeBuildInsert event, I test to see if the identification field has been changed, and if so, if there is a value in the list or textbox. If not, the default value is inserted. It seems to work fine.
thanks,
Chris
|
 |
 |
|