ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: cijojohn on September 06, 2017, 09:04:56 pm

Title: Populate Select Box options using ajax call on CLICK or Tab OUT CELL
Post by: cijojohn on September 06, 2017, 09:04:56 pm
Hi Team,

we want to populate options in select box when user clicks on it or using tab out. The options in select box are dynamic. (depends on other cell values present in the same row). We tried late binding demo but it doesn't helped us.

Could you please share the jsFiddle for the same? (let's say every time user clicks on cell it should populate the options from ajax call)
Title: Re: Populate Select Box options using ajax call on CLICK or Tab OUT CELL
Post by: paramvir on September 06, 2017, 11:08:46 pm
This example of cascading select lists https://paramquery.com/pro/demos/dependent-date-editors is more relevant to your use case.
Please note that the remote request should be synchronous.

Code: [Select]
{ dataIndx: "region", title: "Region", width: 200,
                editor: {
                    type: "select",
                    prepend: { "": "" },
                    options: function (ui) {
                        //make synchronous call to the server to get options depending upon values in ui.rowData   
                        return options;
                    }
                }
            },