How to filter two nested DropDowDataGrid controls in Add/Edit TemplateForm

Hello,

I need to filter "Cidade" by "Estado" in TemplateForm, how can I do this?

Thanks.

Hi @marden.

Please check this thread:

Hello @enchev,

I already read this topic, but I'm completely lost, could you make a video showing how to do this task?
below is all my project with database, could you use it to show me how to do?

https://drive.google.com/open?id=1na4QVEXUypZ0qcinbF177ovPBBH8A_Zg

Thank you.

1 Like

You need to set $filter parameter for the second DropDown data-source method invoke to use the selected value of first DropDown. Which part is difficult for you? To set the filter parameter or to get the selected value from first lookup?

Both, I'm very new to Radzen and I'm lost, I've already watched all the videos that are available and not have any video that teach to do something like this.

Selected value from a lookup can be accessed from the object bound to the form. For example: ${orderdetail.OrderID}

here is also how to set $filter parameter

Hello @enchev,
I did this

but now when i click in a record for edit the field "Cidade" is null

I'm really confuse how to make this work

I returned to the state I was in before

Event LoadData from Form
image

Event Load from page


image

Where should I make the changes to work?

I highly support this. Making cascade of lookup fields is going to boost my apps. Thanks.

@marden I am attaching a working version of cascading dropdowns.

A few observations:

1.The EstadoId column is a string which is why you have to use quotes in filter expressions e.g. EstadoId eq '${event.property}'
2. The UpdateDataOnChange property of the form should be checked so the oportunidade page property stays up to date.
3. The getCidades method should be invoked in the Then event of getOpportunidadeById so we can use ${opportunidade.EstadoId} to initially filter.
4. The Change event of the form is handled to filter when the user changes EstadoId.
5. The LoadData event is modified to use the current ${oportunidade.EstadoId} to filter.

edit-oportunidade.json.zip (2.1 KB)

Hello Marden, did you get it work?

Hello @leam.mx

I still have not got it and I gave up for now, I need to study Radzen to understand how it works in more complex cases like this, at the moment I'm out of time, Radzen's team support is spectacular, even though I'm not a Radzen Professional user they are still answer my doubts.

When I have enough time I will go back to studying Radzen

Exactly the same for me. I Hope Radzen's team could make a video soon. Excited making this with an embedded highchart and as a cordova app all with Radzen! Thanks.

@marden the file I have attached is supposed to be a drop-in working replacement. I also described what I have changed in it to make it work.

@marden I made it work! please let me know if I can help. Regards.