ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: lalitsingh on December 27, 2013, 01:03:06 pm
-
Hi ,
I am using custom editing grid section from the demos, i am using dropDownEditor, i found that there is one function
var dropDownEditor = function (ui, arr) {
debugger;
var $cell = ui.$cell, data = ui.data, rowIndx = ui.rowIndxPage, colIndx = ui.colIndx;
var dataCell = $.trim(data[rowIndx][colIndx]);
var str = "";
for (var i = 0; i < arr.length; i++) {
if (dataCell == arr)
str += "<option selected>" + arr + "</option>";
else str += "<option>" + arr + "</option>";
}
var $sel = $("<select>" + str + "</select>")
.appendTo($cell);
}
from where does "ui" parameter be passed , i am seeing it shows undefined.
i have kept in body of my html page as <div id="grid_custom_editing" style="width: 100%;"></div>.
please let me know what ui will contain.
Regards,
Lalit Singh
-
In the demo
http://paramquery.com/demos/editing_custom
ui is received by editor callback as argument and passed onto dropDownEditor.
http://paramquery.com/api#option-column-editor
editor: function (ui) {
var arr = ['', 'Speedy Express', 'United Package', 'Federal Shipping'];
dropDownEditor(ui, arr);
}
-
i tried above code as also mentioned in demos. but it is not working.
do i have to already keep table with dropdown created or it will generate dropdown dynamically. ?
-
It creates dropdown dynamically.
Please post your code in http://jsfiddle.net/LAgZx/64/ to check which part of your code is not working.