Deletion in Forms

qngoqngo Member Posts: 58
I created a form with a subform, but when I delete the Header of the form, the lines are not deleted. How do I get the lines deleted when a user deletes the header? Also, my subform doesn't seem to have the scroll bars, but when I just run the form the scroll bars are there. Any ideas what happened to it?

#-o

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Deleting the lines have to be programmed.

    You can look at the salesheader delete trigger for example.
  • qngoqngo Member Posts: 58
    what about the scroll bars for my subforms? Any idea what happened to them, or how I can get them back?
  • ara3nara3n Member Posts: 9,257
    You have to make the subform control the same size or a little bigger than the form that is being displayed in subform
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • qngoqngo Member Posts: 58
    I don't quite understand what you mean. I tried changing the subform size, and still no scroll bars. Currently it's the same size.
  • ara3nara3n Member Posts: 9,257
    Take a look at sales Order Form and sales line subform. as an example. Please make the Sub FORM smaller. You'll see the scroll bars.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • qngoqngo Member Posts: 58
    This is very odd. If i don't set the HorzGlue and VertGlue to both, I get the scroll bar, but if i use both, i lose it. Is there something I'm missing?
  • ara3nara3n Member Posts: 9,257
    Your Sub Form is too large. Design it and remove the empty spaces to the right and to left of tablebox. The Form should be the same size as tablebox. You should leave the HorzGlue and VertGlue to both. Because If you maximize the the parent form it will be zero.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • qngoqngo Member Posts: 58
    Thanks a lot \:D/ =D> That seems to have done the trick.
  • ara3nara3n Member Posts: 9,257
    :P
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,307
    The easiest way to do this is:
    1: you design your subform, and don't worry about size yet. Just slap the table box with the right fields on there, get rid of the buttons and save the form.

    2: you design the header/line form, and you size the subform control to the size that you need. Open the properties page for the subform control and copy the width and the height of the control into notepad.

    3: make sure that the glue properties are set to both, and you set it not to have any borders. Save and close your header/line form.

    4: open your subform in design mode again. First drag the table box to the top left corner, as high and as far left as you can get it, so there is no space between the tablebox and the left/top edge of the form.

    5: Open the property page for the table box and paste the height/width values into it.

    6: Open the property page for the form and paste the same values in there.

    At this point, your subform, the tablebox on the subform and the subform control are all the same size, and you will have a header/lines form that looks just like the native NAV Sales Order form.

    By the way, the easiest way to start a header/line form is to use the form wizard to create a card type form for the header table. All you need to do is make some room between the tab control and the buttons for the subform control.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    If you use the guidelines your tabform is 16060 wide and approx 5500 high

    The subform is always 16060 x 3300.
Sign In or Register to comment.