|
function onCreate(args) {
$("#" + this._id + "_" + "stringDlg").ejDialog({
//bind the open event for the filter dialog
open: function (args) {
var gridObj = $("#FlatGrid").ejGrid("instance"),
curField = $(".e-autocomplete").ejAutocomplete("model.fields.text");
$("#" + this._id).find(".e-operator").hide();
// data = ej.distinct(window.gridData, curField);
data = ["ERM", "RFP", "RFT", "ACD", "RCD"] // My options
//Render the ejDropDownList instead of ejAutoComplete
$(".e-autocomplete").ejAutocomplete("destroy");
$("#" + gridObj._id + "_acString").ejDropDownList({ dataSource: data, width: "100%" });
}
})
} |
|
function onCreate(args) {
$("#" + this._id + "_" + "stringDlg").ejDialog({
//bind the open event for the filter dialog
open: function (args) {
var gridObj = $("#FlatGrid").ejGrid("instance"),
curField = $(".e-autocomplete").ejAutocomplete("model.fields.text");
$("#" + this._id).find(".e-operator").hide();
// data = ej.distinct(window.gridData, curField);
data = ["ERM", "RFP", "RFT", "ACD", "RCD"] // My options
//Render the ejDropDownList instead of ejAutoComplete
$(".e-autocomplete").ejAutocomplete("destroy");
$("#" + gridObj._id + "_acString").ejDropDownList({ dataSource: data, width: "100%" });
$("#" + gridObj._id + "_acString").addClass("input e-js");
}
})
}
|
|
function onCreate(args) {
$("#" + this._id + "_" + "stringDlg").ejDialog({
//bind the open event for the filter dialog
open: function (args) {
var gridObj = $("#Grid").ejGrid("instance"),
curField = $(".e-autocomplete").ejAutocomplete("model.fields.text");
if(curField == "CustomerID" || curField == "ShipCountry"){
$("#" + this._id).find(".e-operator").hide();
// data = ej.distinct(window.gridData, curField);
if (curField == "CustomerID")
data = ["FOLKO", "BLONP", "WARTH", "FRANK", "RATTC"] // My options
else if (curField == "ShipCountry")
data = ["USA", "Germany"]
//Render the ejDropDownList instead of ejAutoComplete
$(".e-autocomplete").ejAutocomplete("destroy");
$("#"+ gridObj._id + "_acString").ejDropDownList({dataSource: data, width:"100%"});
//alert(data)
//alert(curField)
}
else { /* Reset to standard filter
$("#" + this._id).find(".e-operator").show();
$(".e-value").find(".e-dropdownlist").ejDropDownList("destroy");
data = ej.distinct(window.gridData, curField);
$("#" + gridObj._id + "_acString").removeClass("e-autocomplete");
$("#" + gridObj._id + "_acString").ejAutocomplete({ dataSource: data, width:"100%" });
//
}
}
})
}
|