jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Validation popup does not show in the correct place
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 11 years, 3 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
Hello,
I hava a problem with the validation popup when I edit the quantity or the lastname columns. The popup does not show in the correct place with this code. The validation popup only show’s in the correct place for the quantity column if I set column type (“columntype: ‘numberinput'”).
Can you help me?<html xmlns="http://www.w3.org/1999/xhtml"><head> <script src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/jquery-1.10.2.min.js" type="text/javascript"></script> <script src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/gettheme.js" type="text/javascript"></script> <script src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqx-all.js" type="text/javascript"></script> <script src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/globalization/jquery.global.js" type="text/javascript"></script> <link rel="stylesheet" href="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/styles/jqx.base.css" type="text/css" /> <script src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqxdata.js" type="text/javascript"></script> <body> <div id="content"> <script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); var data = []; data.push({ firstname: 'Person1', lastname: 'LastName1', quantity: 10}); data.push({ firstname: 'Person2', lastname: 'LastName2', quantity: 20}); var source = { localdata: data, datatype: "array", updaterow: function (rowid, rowdata, commit) { // synchronize with the server - send update command // call commit with parameter true if the synchronization with the server is successful // and with parameter false if the synchronization failder. commit(true); } }; var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties, rowdata) { return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #008000;">' + value + '</span>'; } var dataAdapter = new $.jqx.dataAdapter(source); // initialize jqxGrid $("#jqxgrid").jqxGrid( { width: 685, height:300, source: dataAdapter, editable: true, theme: theme, selectionmode: 'multiplecellsadvanced', columns: [ { editable: false, text: 'First Name', columntype: 'textbox', datafield: 'firstname', width: 180 }, { text: 'Last Name', datafield: 'lastname', columntype: 'textbox', width: 180,validation: function (cell, value) { if (value != 'abc') { return { result: false, message: "value must be abc" }; } return true; } }, { text: 'Quantity', datafield: 'quantity', align: 'right', cellsalign: 'right', validation: function (cell, value) { if (value < 0 || value > 150) { return { result: false, message: "Quantity should be in the 0-150 interval" }; } return true; } } ] }); }); </script> <div id="jqxgrid"></div>
Hi williamtourinho,
Thanks for the feedback!
We are aware about the validation popup misplacing and have already a work item.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.