Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Defaulting key values in a child band row add
posted

When you turn on the "Add Row" behavior to a band, you normally get a blank row to put new row information into. I was wondering if there is a clean way to for a column in a child band's blank row to actually have data from it's parent row?

 

For example, let's take your normal Customer/Order relationship:

Customer columns:

Customer Number, Customer Name, etc.

Order columns:

Customer Number, Order Number, Order Name, etc.

 

If I want to be able to add a new order, by default the blank row I have to put in the order will force me to type in the Customer Number. I want to be able to pull the customer number from the parent row this order will belong to.

Hopefully this makes sense. I can try to whip up and example if you wish.

Thanks!

Mike

Parents
  • 33839
    Verified Answer
    posted

    Hi Mike,

    In 11.1, there is a DefaultValue property that can be set on a RowAddingColumnSetting.  But it sounds like you want a different default value per parent row, so that wouldn't quite work.  Unless you iterated through all row islands and set the value.  If you do not have the relationship columns visible (theyre hidden), you can simply handle row adding client event and set the value of that cell from the parent row value.  Or you could handle the initialize on the whdg and go through row islands and set them one by one if they are visible.

    regards,
    David Young 

Reply Children
No Data