- Fri Feb 24, 2017 7:20 am
#789370
Hello everyone,
I have a grid table wherein one of variables is a drop down option.
One normally designs a drop down to have a fixed set of options, e.g. 'Yes', 'No' etc. However, in this case I need the drop down options to change based on the values of a few other variables of the grid.
To explain this further: Assume that the name of the grid is CGrid. It has three variables - Category1, Category2 and Score. The Score variable has a drop down control.
Now, the drop down options in Score depend on what values are stored in Category1 and Category2 in a particular row. E.g. if Category1 value is 'A' and Category2 value is B in row #1, then the drop down options of Score in row #1 would be '0', '1' and '2'. However, if Category1 = 'A' and Category2 = 'C' in row #2, then the drop down options of Score in row #2 would be '0', '1' only.
Can this be achieved in the grid itself?
I know that one can achieve this by copying Category1, Category2 values to variables outside of the grid, then populate another variable with the drop down values that depend on Category1 and Category2, and then bring the result back to the Score variable into the grid.
Thanks in advance.
SGK
I have a grid table wherein one of variables is a drop down option.
One normally designs a drop down to have a fixed set of options, e.g. 'Yes', 'No' etc. However, in this case I need the drop down options to change based on the values of a few other variables of the grid.
To explain this further: Assume that the name of the grid is CGrid. It has three variables - Category1, Category2 and Score. The Score variable has a drop down control.
Now, the drop down options in Score depend on what values are stored in Category1 and Category2 in a particular row. E.g. if Category1 value is 'A' and Category2 value is B in row #1, then the drop down options of Score in row #1 would be '0', '1' and '2'. However, if Category1 = 'A' and Category2 = 'C' in row #2, then the drop down options of Score in row #2 would be '0', '1' only.
Can this be achieved in the grid itself?
I know that one can achieve this by copying Category1, Category2 values to variables outside of the grid, then populate another variable with the drop down values that depend on Category1 and Category2, and then bring the result back to the Score variable into the grid.
Thanks in advance.
SGK