This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 10 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Grid › How to get the selected option from a Dropdown created from Cellrender function
Tagged: angular grid, angular2 grid, bootstrap grid, grid dropdown value, javascript grid, jquery grid, jqwidgets grid, jqxgrid, typescript grid
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 10 months ago.
So i have a function that creates options for a selected menu. I call this function in a cellrenderer. I want to take the value of the selected element of the dropdown.
var renderlist = function (row, column, value) {
var buildList = '<select id="Select' + row + '" onChange="selectionChanged(event)">';
for (var i = 0; i < dataSource.length; i++) {
if (value == dataSource[i]) {
buildList += '<option selected="true">' + dataSource[i] + '</option>';
}
else {
buildList += '<option>' + dataSource[i] + '</option>';
}
}
buildList += '</select>';
return buildList;
};
Here is my function.
And here is my column.
columnObj = {
text: colCounter,
datafield: "Dropdown" + i,
editable: false,
width: 60,
cellsrenderer: renderlist
};
Hello anton,
I would like to suggest you this “Widget Column” demo. It could be useful.
The cellsrenderer
is a callback for customizations in the cells but will be better to use createeditor
(with our widgets) and geteditorvalue
callback for example.
Please, take a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/cellcustomediting.htm?light
Hope this helps.
Best Regards,
Hristo Hristov
jQWidgets team
http://www.jqwidgets.com
You must be logged in to reply to this topic.