jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Checkbox disappears
Tagged: checkbox
This topic contains 2 replies, has 2 voices, and was last updated by wsundet 4 years, 1 month ago.
-
AuthorCheckbox disappears Posts
-
I am using jqxGrid and have a issue with the checkbox disappearing. As the page with the grid opens, the checkboxes are displayed for a split-second and then they disappear. I have the same problem when the app runs in a browser or when it runs as a native app. It’s as if something is over-writing the initial grid. There are no errors. jqxWidgets (I am using version 11.1.3) is in a local folder, not being downloaded.
Thank you
$(document).ready(function () {
var sourceHealthScreening = {
localdata: dataHealthScreening,
datatype: “array”,
datafields: [
{
name: “MemberID”,
type: “integer”
},
{
name: “Test”,
type: “string”
},
{
name: “Year”,
type: “integer”
},
{
name: “Result”,
type: “string”
}
]
};
var dataAdapterHealthScreening = new $.jqx.dataAdapter(sourceHealthScreening, {
downloadComplete: function (dataHealthScreening, status, xhr) {
},
loadComplete: function (dataHealthScreening) {
},
loadError: function (xhr, status, error) {
}
});
var getEditorDataAdapter = function (datafield) {
var dataAdapterHealthScreening = new $.jqx.dataAdapter(sourceHealthScreening, { uniqueDataFields: [datafield] });
return dataAdapterHealthScreening;
};
$(“#HealthScreeningInfo”).jqxGrid({
source: dataAdapterHealthScreening,
editable: true,
selectionmode: “checkbox”,
altrows: true,
editmode: “click”,
columns: [
{
text: “MemberID”,
datafield: “MemberID”,
hideable: “true”,
hidden: “true”
},
{
text: “Test”,
columntype: “template”,
datafield: “Test”,
width: “45%”,
cellsalign: “center”,
align: “center”,
initeditor: function (editedRow, cellvalue, editor) {
endRow = editedRow;
editor.jqxDropDownList({
source: healthScreening,
width: “45%”,
placeHolder: “Choose:”,
autoOpen: true,
animationType: “fade”
});
editor.on(“select”, function (event) {
$(“#HealthScreeningInfo”).jqxGrid(“endcelledit”, endRow, “Test”, false);
});
}
},
{
text: “Year”,
columntype: “template”,
datafield: “Year”,
width: “15%”,
cellsalign: “center”,
align: “center”,
initeditor: function (editedRow, cellvalue, editor) {
endRow = editedRow;
editor.jqxDropDownList({
source: yearlist,
width: “15%”,
placeHolder: “Choose:”,
autoOpen: true,
animationType: “fade”
});
editor.on(“select”, function (event) {
$(“#HealthScreeningInfo”).jqxGrid(“endcelledit”, endRow, “Year”, false);
});
}
},
{
text: “Result”,
columntype: “template”,
datafield: “Result”,
width: “38%”,
cellsalign: “center”,
align: “center”,
initeditor: function (editedRow, cellvalue, editor) {
endRow = editedRow;
editor.jqxDropDownList({
source: result,
width: “38%”,
placeHolder: “Choose:”,
autoOpen: true,
animationType: “fade”
});
editor.on(“select”, function (event) {
$(“#HealthScreeningInfo”).jqxGrid(“endcelledit”, endRow, “Result”, false);
});
}
}
]
});});
Hello wsundet,
I try to recreate your scenario in this example below and with some changes, it seems to work fine:
http://jsfiddle.net/fyeutL9r/1/
Unfortunately, I did not see the behavior mention by you about the checkboxes.
The changes that I made are for binding to theclose
event.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comThank you, the code you provided was very helpful.
I appreciate it very much!
-
AuthorPosts
You must be logged in to reply to this topic.