DataGrid help needed.
Posted: Fri Apr 07, 2023 12:49 pm
Hi,
I'm making a DG for products, of various types.
One particular type is a manufactured-in-house product.
This product consists of component type products that are already listed; the component products may be sized to spec, for example the manufactured product includes 2 (say) lengths of timber, cut from a longer purchased piece of timber.
I want to change the code of the component product to become the code of the manufactured product & the code of the component product.
This will ensure that a list of the sized component products will appear directly under the manufactured product when the DG is sorted.
It seems to me that the script required is to copy the component product row, then pasted as a new row, then code-edited. The user can then edit the size (and hence the product cost, which will be totalled with other sized component costs to become the cost of the manufactured product). I'm stuck on how to script to copy a row (where the user has been instructed to place the cursor), then paste it back in as a new row.
Any ideas ?
I'm making a DG for products, of various types.
One particular type is a manufactured-in-house product.
This product consists of component type products that are already listed; the component products may be sized to spec, for example the manufactured product includes 2 (say) lengths of timber, cut from a longer purchased piece of timber.
I want to change the code of the component product to become the code of the manufactured product & the code of the component product.
This will ensure that a list of the sized component products will appear directly under the manufactured product when the DG is sorted.
It seems to me that the script required is to copy the component product row, then pasted as a new row, then code-edited. The user can then edit the size (and hence the product cost, which will be totalled with other sized component costs to become the cost of the manufactured product). I'm stuck on how to script to copy a row (where the user has been instructed to place the cursor), then paste it back in as a new row.
Any ideas ?