Query re add/edit form

I am trying to produce an Add/Edit form for a charges table. This table links to a Product Record. When this Product Record is added/amended on the charge I require that the Description on the relevant product is used to populate a Description on the Charge which can, if required, be modified on that charge.

I have set up the Form and have a Lookup Data Grid that allows the user to select a Product. However on the Change event on this object I can not work out how to populate the Description on the Charge.

I have tried to write direct to the Description Field and also tried using a variable. Neither works.

I will be grateful for any assistance.

Regards

Peter Stanesby

Hi @PeterS,

You can probably assign the description in the Submit handler of the form. Find the selected product and use its Description property:

The full code is

${orderdetail.Description} = getProductsResult.Where(p => p.ProductId == ${orderdetail.ProductId}).FirstOrDefault().Description

You will have to replace ${orderdetail} with the page property that Radzen has generated for your change record. Also replace any other properties that are different in your case.