Cascade Lookup Example not working

Hi

I'm having some trouble following your videos as they seem out of date with latest release (ie, no "fields tab" when I click on Form) but I seem to be finding the same properties after some clicking around. So first off the example:

...it says make a page property "order" and assign to Form Data property but my Form already has a data property assigned when I look there called "${captureditem}". So I ignored the video step and used that to bind to my Model lookup disabled property but I get the error as seen in the image below:

Thanks
Mike

The video is for Angular, check this demo for Blazor:

Thanks, I'll take a look. No Serverside example?
I've implemented a new procedure to get a model by make in Visual Studio but as soon as I open RADZEN, it deletes the code. Is this expected or is there a way to stop that.

I can't find 1 clear example of creating these cascade lookups using server-side approach. I see there is an option to use #Filter maybe out the box without me making my own GetModelByMakeId but that has no clear example either.

This looks close but it does not work when I run in VS and if I open in RADZEN it deletes the implementation anyway

This has been covered in many places in our documentation and in the forum. I recommend checking the existing resources first.

I've spent hours trying and nothing so its not clear I'm afraid.

Perhaps you can explain what goes in here if its something simple:

You have probably missed the following help articles which explain how Radzen works:


You can use the Query Builder to set filter expressions visually.

Thanks for those articles. That explains the code getting deleted.
Thanks for pointing out the "query builder" icon - I totally missed that. That's awesome - so no need to drop out and into VS...but I'm again stuck. Nothing from the suggested code items (see below) works.

I still recommend finishing the video even though it is for Angular. It shows important concepts that are applicable to Blazor applications.

You need to store the value of the parent dropdown in a page property and use that page property in the query builder. Getting the user input in a page property is again covered in the documentation.

ok, so I looked again at the video and it is for disabling dropdowns which is not the problem I'm having.

Following your instruction I have made the page prop but again, it's so incredibly frustrating to get only 1 step each time and then fail....now how do I get the MakeID out of this new property "Makes"?

Thanks for your patience.

Hi, appreciate your help and I have also just subscribed to the Pro license under our general purchasing name but same domain.

What is the Makes property? Did you check the linked article which shows how to get user input in a page property?

Ok. I understood what the Makes property is. However it can't be used for the filter because it represents the list of all "Make" items.

Here is a quick demo that shows how to implement cascading dropdowns. It uses the Northwind database and shows the Category -> Product relationship.

  1. First we invoke the getCategories method and set a page property categories to the ${result}. This stores all entries from the Categories table of the Northwind database.
  2. Then we create a page property categoryId which will store the id of the selected category. We will use it later to set the Value property of the parent dropdown. This is what I called getting the user input in a page property.
    .
  3. We set the properties of the parent DropDown. Data is set to ${categories}, TextProperty to CategoryName and ValueProperty to CategoryID. Then we set Value to ${categoryId}. Whenever the user selects an item from this dropdown two things will happen - the categoryId page property is set to the CategoryID value of the selected item and the Change event will fire.
  4. Then we handle the Change event of the parent DropDown to populate the child DropDown. Execute the getProducts method and set the filter to CategoryId equals ${categoryId}.


    We also store the result in another page property products.
  5. Finally we configure the child DropDown. Set Data to ${products}, TextProperty to ProductName and ValueProperty to ProductID

That's everything.

If you want to implement this in a form you may omit the step of creating a separate property to store the selected parent value. It may already be configured by the Radzen CRUD page wizard. For example it may already be set to ${order.CategoryID}. Then when filtering the children you use ${order.CategoryID} for the filter value.