Jqgrid下拉列表未触发OnChange事件

Jqgrid下拉列表未触发OnChange事件,jqgrid,html-select,Jqgrid,Html Select,我在jqgrid上工作。我有一个列,里面有下拉列表 我在下拉列表中绑定更改事件。但是,它并没有被触发。我不知道该在哪里提到dataEvents 代码: beforeProcessing: function (response) { var $self = $(this); $self.jqGrid("setColProp", "Country", {

我在jqgrid上工作。我有一个列,里面有下拉列表

我在下拉列表中绑定更改事件。但是,它并没有被触发。我不知道该在哪里提到dataEvents

代码:

   beforeProcessing: function (response) {
                            var $self = $(this);
                            $self.jqGrid("setColProp", "Country", {
                                formatter: "select",
                                edittype: "select",
                                editoptions: {
                                    value: $.isPlainObject(response.Mapping) ? response.Mapping : []
                                },
                                dataEvents: [
                                {
                                    type: 'change',
                                    fn: function (e) {
                                        alert("I am fired by the key press event of text box inside jqgrid");
                                    }
                                }
                                ]
                            });
                        },

我没有收到任何错误..但事件未触发。请帮忙。

我解决了这个问题。问题是DataEvents是Editoptions的属性。我把它放错地方了

这可能对某些人有用..谢谢

beforeProcessing: function (response) {
                            var $self = $(this);
                            $self.jqGrid("setColProp", "Country", {
                                formatter: "select",
                                edittype: "select",
                                editoptions: {
                                    value: $.isPlainObject(response.Mapping) ? response.Mapping : [],
                                dataEvents: [
                                {
                                    type: 'change',
                                    fn: function (e) {
                                        alert("I am fired by the change event of drop down inside jqgrid");
                                    }
                                }
                                ]
                              }
                            });
                        },

我解决了这个问题。问题是DataEvents是Editoptions的属性。我把它放错地方了

这可能对某些人有用..谢谢

beforeProcessing: function (response) {
                            var $self = $(this);
                            $self.jqGrid("setColProp", "Country", {
                                formatter: "select",
                                edittype: "select",
                                editoptions: {
                                    value: $.isPlainObject(response.Mapping) ? response.Mapping : [],
                                dataEvents: [
                                {
                                    type: 'change',
                                    fn: function (e) {
                                        alert("I am fired by the change event of drop down inside jqgrid");
                                    }
                                }
                                ]
                              }
                            });
                        },