Subform fields uneditable

ishcattoishcatto Member Posts: 7
edited 2005-10-03 in Navision Attain
We have a subform where we turn on/off the Editable property of the fields on the subform via a command button [CurrForm.ExtItemSubForm.FORM.SetModStatusTrigCode(TRUE)] ...but only checkbox fields turn on/off, not the text fields. Is there a way to turn on/off the Editable property of these text fields on the subform via a command button.

Thanks,
Peter
Peter

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Well, this sounds a bit strange, because it should work already as you describe that you have programmed it. :o

    What is the exact code that you have put in the SetModStatusTrigCode function?
  • ishcattoishcatto Member Posts: 7
    The following is the trigger code that is on the subform itself.

    SetModStatusTrigCode(VAR RALocalModifyRecordBoolean : Boolean)
    //RA:: Modification Date: 09/29/2005 :: Intent: Modify Card :: Creation Date: 09/13/2005 :: BEGIN
    RAModifyRecordBoolean := RALocalModifyRecordBoolean;
    CurrForm.EDITABLE(RAModifyRecordBoolean);
    //RA:: Modification Date: 09/29/2005 :: Intent: Modify Card :: Creation Date: 09/13/2005 :: END

    Remember, this is the code in the subform.

    Thanks and regards,
    Peter
    Peter
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Well, this is strange. If I put this code in a CRONUS database Sales Order Subform and call it from the Sales Order form, it works perfectly, like it should.

    Could you do me a favour and try this also on a non-modified standard Navision form like the sales order.

    If this also works for you, you can work out the differences between the forms.
  • ishcattoishcatto Member Posts: 7
    Mark,

    We used the Sales Order form format to create our form. We know that this works for a subform that is a tabular form. It also works, as stated, on checkbox fields. We seem to have problems when we put text fields in the form.

    Regards,
    Peter
    Peter
  • CtrlShiftF11CtrlShiftF11 Member Posts: 29
    Check the properties of the text fields and make sure that they're not set to editable=false or enabled=false.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Ok, so your subform is not a tabular form, this is not a common thing :?

    Like CtrlShiftF11 sayd, the default value should be editable then, check the properties on the subform.

    If you want by default to be the textfields not-editable you can program this in the OnOpenForm.
  • ishcattoishcatto Member Posts: 7
    Guys....my oops :oops: :roll: ....the color for the text fields were not changing each time we turned on/off the editable property of the form...and we thought it never gave us the capability to change information...but we can edit these fields.

    Sorry to trouble you...I do appreciate your time.

    Kindest regards,
    Peter
    Peter
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Never mind. Most important is that the problem is solved :D
  • kinekine Member Posts: 12,562
    This problem with colors is common. If you set default editable to no, background color will be stll gray. Buf if you change default to yes, and change it with code in OnOpen to no, all will be OK...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.