How to change type of editor for a column in the Query Columns Grid? (ASP.NET Edition)
Last modified:
Use the AQB.Web.QueryBuilder.GridComponent.customEditControl event for this purpose. Below is the sample handler that changes the editor for the "Column name" (Alias) column to a combo box and prepopulates it with the predefined values.
<script>
AQB.Web.onApplicationReady(function(qb) {
qb.GridComponent.customEditControl = function (key, cell, row) {
var control = null;
if (key == qb.MetaData.FieldParamType.alias) {
var values = ["alias1", "alias2", "alias3", "alias4"];
control = $('<select>');
values.forEach(function(val, i) {
$('<option value="' + val + '">' + val + '</option>').appendTo(control);
});
}
return control;
}
});
</script>