Note:
- The example demostrate dependent dropdown, or sometimes called nested dropdown. It can be nested in unlimited level.
- It's important that all the dropdowns must be set to "autocomplete" edit type before calling set_nested_dropdown() method.
- Due to the way the select is implemented in jqGrid, the 3rd parameter of set_col_edittype() method must contain the
ENTIRE string of all the key:value pair of that column, or the data will appear to be missing when display. There is no way
around due to the jqGrid limitation.
- The dependency logic is essentially embedded in the javascript data source (e.g. $countryStateData) used to populate the dropdown dynamically based on
its selected parent value.
- Nested dropdown only works in INLINE edit at the moment.
In a nutshell, the phpGrid displays the datagrid rendered by jqGrid. Select2 does the autocomplete and nested dropdown completely on the client side.
which is also the reason why the data javascript data source must be structured correctly.
PHPGRID_ERROR: Could not execute query. Error 102