How to give an x-path for the countries related with continents

0
Hi Team,    My requirement is I have two columns first column is continents we need to give dropdown for that and the 2nd column is related with the first column. for example my continents are America, Asia and my countries are canada, colombia, Indonesia and vietnam so If i click the first column dropdown that is America in the second column dropdown it need to show only countries related to the selected continent America only. for this I am trying to give X-path in the second column but not able to give properly. So please help me for this. I am attaching the document related to my requirement.   Thanks & Regards, Sruthi M
asked
4 answers
1

Hi Sruthi,

You can either go to the blog which I wrote by using this link:

https://medium.com/mendix/easily-create-custom-dependent-drop-downs-in-mendix-343a38b8041d

Here, I have explained how to achieve this requirement,

Also, you can look at the 'constraint by' feature of the reference selector,

You can learn more about the constraint by feature, by clicking on the link below:

https://docs.mendix.com/refguide7/reference-selector/#constrained-by

 

Let me know, if you have any issues,

Hope it helps!

answered
1

Hi Sruthi,

If I understood your question correctly, you expect the values in the second dropdown to be displayed based on the selection made in the first dropdown.

 

Are you using datagrid 2 ?

answered
0

Hi,

Use Accordian or Treewidget instead of a grid.

answered
0

Hi Sruthi Murari 

In the country dropdown, set the data source to Country and add an XPath constraint. The XPath constraint should refer to the selected Continent.

  [Country_Continent/Continent = $currentObject/Continent]

answered