ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: eloan on June 28, 2017, 11:44:29 am
-
Hi.
please, help me.
I used select tag in cell value.
I want to use onchange event.
When it's used in grid, there is a case different from usual.
An assumed browser is IE11, chrome and Firefox.
The chrome, as expected.
The IE11 is 1st time only. When a focus is removed once, it becomes effective once again.
The Firefox is indicated list in twice, and a event is only the 2nd.
About Firefox.
It was no problem in version 38.0.1.
It's version 54 that a problem has occurred.
I using ParamQuery Pro v3.3.4.
=== test source ===
<select onchange="chTableVal(this);"><option></option><option>1</option><option>2</option></select>
<div id="testGrid" style="margin: auto;"></div>
<script>
function chTableVal(obj) {
alert("test");
}
$(function () {
var data = [ { select: '<select onchange="chTableVal(this);"><option></option><option>1</option><option>2</option></select>' }, ];
var obj = { title: "test",
dataModel: { data: data }
};
$("#testGrid").pqGrid(obj);
});
</script>
======================================================
-
Select lists are not tested / supported this way.
Please use select list as editor instead of including html of select list directly in data.
as ShipVia column in https://paramquery.com/pro/demos/editing_custom
-
Thanks.
A select list in editor was considered.
But it's difficult to find out that it's a list seemingly.
Is there a way to show that it's a list like ▼ on the right side?
Best regards.
-
it's easy to place a bootstrap, jQueryUI or a custom icon at the right side of cell in postRender callback.
postRender: function(ui){
this.getCell(ui)
.css("position","relative")
.append("<span style='opacity:0.3;position:absolute;right:5px;top:5px;' class='glyphicon glyphicon-triangle-bottom'></span>");
},
In css:
.pq-grid .glyphicon{
font-family:Glyphicons Halflings;
}
In grid options:
postRenderInterval: 0
-
It could be settled.
Thanks.