jQWidgets Forums
jQuery UI Widgets › Forums › Lists › DropDownList › whole grid values turning into blue when I click on dropdown
This topic contains 2 replies, has 3 voices, and was last updated by jakubanowakowski 2 years, 6 months ago.
-
Author
-
Hi,
When I Click on Dropdown to select value, the whole grid values and Column names turning into green. Clearly the whole grid selecting.
I have tried the way by changing properties , but Didn’t find an issue, Please need some help.Here is my Code:
var nestedGridAdapter = new $.jqx.dataAdapter(srcDetails);if (grid != null) {
grid.jqxGrid({
source: nestedGridAdapter,
width: ‘80%’,
height: 250,
sortable: true,
pageable: true,
theme: ‘classic’,
filterable: true,
groupable: false,
editable: true,
autoheight: false,
selectionmode: ‘checkbox’,
editmode: ‘click’,
columns: [{
text: ‘Dropdown’, datafield: ‘Code’, width: ‘18%’,
displayfield: ‘Name’, columntype: ‘dropdownlist’, type: ‘string’,
createeditor: function (row, value, editor) {editor.attr(‘rowId’, row);
editor.addClass(‘class’, ”);
editor.jqxDropDownList({ source: Adapter, theme: “classic”, enableSelection: true, displayMember: ‘DisplayName’, valueMember: ‘Code’, autoDropDownHeight: true });editor.bind(‘change’, function (event) {
if (event.args.item) {
var selectedRowIndex = parseInt(editor.attr(“rowId”));
if (confirm(“are you sure, you want to change a name?”))
{
var indexs = grid.jqxGrid(‘selectedrowindexes’);//add current select row if no checkboxes selected
if (indexs.length === 0) {
indexs.push(selectedRowIndex)
}
var eanName = [];
for (var i = 0; i < indexs.length; i++) {
var rowData = grid.jqxGrid(‘getrowdata’, indexs[i]);
grid.jqxGrid(‘setcellvalue’, indexs[i], ‘Name’, event.args.item.label);
var eanDetails = { EAN: rowData.EAN, Code: event.args.item.value };
eanName.push(eanDetails);
}
sendMail(eanName, event.args.item.value);
}
event.preventDefault();
}
});
}
,
initeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
editor.jqxDropDownList(‘open’);
}
}
]
});
Thanks,
SandyHello Sandy,
Please, clarify your case.
What do you want to achieve?
If you want to change the style of the whole row which is edited then you could try this demo:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/editrowsrendering.htm?light
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comI have similar issue
-
AuthorPosts
You must be logged in to reply to this topic.