Grid Options

FrancoisPapineau

Member
Hi, I am working with an application and a find&browse form is calling an headerless detail form. A parameter (a flag) is passed through the headerless detail form.and, depending on the flag value I want to change the grid option "No Adds on Update Grid" (to be enabled or disabled depending on the flahg's value).
Thanks!
 
I don't know if you can change _that_ on the fly.
You _could_ try using the SUPPRESS ADD system function.

Gene
 
Suppress Add prevents them from being written from the grid to the database.

You want to prevent new lines from being added to the grid?
 
Yes, maybe I have to put he code into the Post Dialog Is Initialized and not into the Dialog is Initialized section like I did.
I will try this !
 
OK you were right, the lines I added into the grid were not added into the table, but I still can add new lines into the grid and I want to disable this possibility, exactly like when I choose the grid option "No Adds On Grid Updated".
Thank
 
I think your best (read easiest) option is to create a second headerless/detail form. One of the forms will have the "No Adds" set on the other set off. Then you call one or the other. The easiest way to copy is to create the first form, get it finalized and then copy the entire application and using only the form you want (after you change the "No Adds" setting). Form Interconnects work within applications or across applications.

Ben again
 
Thanks a lot, I think that it is actually the best solution to resolve my problem.
François
 
Here is another work around. Although you can't prevent the empty row from showing, you can disable it when the grid row is entered. Check whatever condition you see fit such as blank fields that are always supposed to be populated, then disable the grid row. It works best to put the same code in "Row is Entered" and "Row is Selected (Web Only)"

This way the last row is still there but disabled. Since it's disabled, another row will never show up.
 
Back
Top