on 04-03-2008 5:23 PM
Hi,
I have a user defined form with 5 tabs.
As soon as I click on 2 particular tabs, if Form is in OK mode, it changes to Update mode.
Even before the control comes to the Add-on's ItemEvent it changes to Update mode.
Also, I get the message "Changes will be lost", when browsing thro' records. Even when the form is in OK mode, I get this message.
I tried setting AffectsFormMode=false for all the controls.
Please help me with your inputs.
Thanks in advance.
Regards,
Geetha
Hi Geetha,
How are you generating your form (ie XML or via code)? The AffectsFormMode is the correct way of dealing with this. However, a folder object actually has 2 AffectsFormMode properties. One is part of the item and one is a property of the folder specific properties.
For example, here is an extract from a srf file for a folder:
<item uid="MyFolder" type="99" left="7" tab_order="0" width="120" top="72" height="20" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="0">
<AutoManagedAttribute/>
<specific caption="Scheduling" AffectsFormMode="0" val_on="Y" val_off="N" pane="0">
<databind databound="1" table="" alias="FolderDS"/>
</specific>
</item>
As you can see, the AffectsFormMode property appears twice so you need to make sure you set both to 0. If you are setting the property through code, there is only an AffectsFormMode of the Item object so this might be why setting the property to 0 through code doesn't work. I'd always recommend that you create your forms in XML (ie an srf file created through Screen Painter) as it's faster and more flexible.
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can set
oForm.AutoManaged = False
but than you have to handle the FormMode by yourself
regards
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.