jQWidgets Forums
Forum Replies Created
-
Author
-
May 15, 2015 at 9:38 am in reply to: Grid error on cell validation for one row Grid Grid error on cell validation for one row Grid #71169
Hello Ioana,
Here is an example which shows how to create a Grid from Array data. I hope it will be helpful to you.
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxgrid.edit.js"></script> <script type="text/javascript"> $(document).ready(function () { // prepare the data var data = new Array(); var firstNames = [ "Andrew" ]; var lastNames = [ "Fuller" ]; var productNames = [ "Black Tea" ]; var priceValues = [ "2.25" ]; for (var i = 0; i < 1; i++) { var row = {}; var productindex = Math.floor(Math.random() * productNames.length); var price = parseFloat(priceValues[productindex]); var quantity = 1 + Math.round(Math.random() * 10); row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)]; row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)]; row["productname"] = productNames[productindex]; row["price"] = price; row["quantity"] = quantity; row["total"] = price * quantity; data[i] = row; } var source = { localdata: data, datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source, { loadComplete: function (data) { }, loadError: function (xhr, status, error) { } }); $("#jqxgrid").jqxGrid( { source: dataAdapter, autoheight: true, editable: true, selectionmode: 'singlecell', columns: [ { text: 'First Name', datafield: 'firstname', width: 100 }, { text: 'Last Name', datafield: 'lastname', width: 100 }, { text: 'Product', datafield: 'productname', width: 180 }, { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' }, { text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' }, { text: 'Total', datafield: 'total', width: 100, cellsalign: 'right', cellsformat: 'c2' } ] }); }); </script> </head> <body class='default'> <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;"> <div id="jqxgrid"></div> </div> </body> </html>
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi sjkcwatson,
Here is another example which shows how to get the Windows’s HTML, add it to a new browser window and trigger printing.
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script> </head> <body> <div id='content'> <script type="text/javascript"> $(document).ready(function () { $("#jqxwindow").jqxWindow({ height: 100, width: 300, }); $("#print").jqxButton(); $("#print").click(function () { var content = $('#jqxwindow').jqxWindow('content'); var newWindow = window.open('', '', 'width=300, height=100'), document = newWindow.document.open(), pageContent = '<!DOCTYPE html>\n' + '<html>\n' + '<head>\n' + '<meta charset="utf-8" />\n' + '<title>jQWidgets Window</title>\n' + '</head>\n' + '<body>\n' + content + '\n</body>\n</html>'; document.write(content); document.close(); newWindow.print(); }); }); </script> <div id='jqxwindow'> <div>Header</div> <div>Content</div> </div> <div style='margin-left: 10px; float: left;'> <input type="button" value="Print" id='print' /> </div> </div> </body> </html>
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hello sjkcwatson,
Unfortunately, exporting from jqxWindow is not available. You may try the following example as a workaround which exports window’s content in file: http://jsfiddle.net/9fjLah0p/.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 15, 2015 at 6:32 am in reply to: scrollBarSize for mobile browsers scrollBarSize for mobile browsers #71155Hello nab054371,
Our Development plans are available online: http://www.jqwidgets.com/roadmap/.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 14, 2015 at 2:37 pm in reply to: select row where data is dropped select row where data is dropped #71126Hello Rahul,
Please, provide us with a jsfiddle example which demonstrates your issue so we can determine how to help you best.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 14, 2015 at 11:15 am in reply to: Special Characters Allowed in JqxNumberInput Special Characters Allowed in JqxNumberInput #71118Hello Iyanar K,
Here is an example which shows how to restrict input special characters like $ and #. I hope it will be helpful to you.
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxtooltip.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxnumberinput.js"></script> <script type="text/javascript"> $(document).ready(function () { // Create jqxNumberInput $("#numericInput").jqxNumberInput({ width: '250px', height: '25px', min: 0, max: 1000}); // Create currency Input. $("#currencyInput").jqxNumberInput({ width: '250px', height: '25px', min: 0, max: 1000, symbol: '$'}); // Create custom validation Input. $("#validation").jqxNumberInput({ width: '250px', height: '25px', min: 0, max: 1000, value: 0 }); $('.jqx-input-content').keypress(function (key) { if (key.charCode == 35 || key.charCode == 36) return false; }); }); </script> </head> <body class='default'> <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;"> <div>The input is restricted from 0 to 1000</div> <div style='margin-top: 10px;'> Number</div> <div style='margin-top: 3px;' id='numericInput'> </div> <div style='margin-top: 10px;'> Currency</div> <div style='margin-top: 3px;' id='currencyInput'> </div> <div style='margin-top: 10px;'> Custom Validation Message</div> <div style='margin-top: 3px;' id='validation'> </div> </div> </body> </html>
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 14, 2015 at 9:20 am in reply to: Tree like expandable feature inside jqxDropDownList Tree like expandable feature inside jqxDropDownList #71109Hello dineshnk,
Unfortunately, this scenario is not supported. You can display the jqxTree in a popup with the jqxDropDownButton. You may look at DropDown Tree demo.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 14, 2015 at 6:44 am in reply to: Weird JS error when exporting my jqxGrid Weird JS error when exporting my jqxGrid #71092Hi Amit,
Please, provide us with a code sample or JSFiddle example demonstrating the behaviour so we can test to determine the source of the issue.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 13, 2015 at 12:10 pm in reply to: JqxInput event can't get called JqxInput event can't get called #71069Hi cpuin,
Would you be able to reproduce this issue in a small JSFiddle example so that we may run your code and test it?
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.comHi timwoj,
This cannot be achieved, unfortunately, but if you want you can set ‘closeOnClick’ property to false to disable closing tooltip on click.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 13, 2015 at 8:52 am in reply to: JqxInput event can't get called JqxInput event can't get called #71056Hi cpuin,
Please, note that in our latest example the check for values in jqxInput is separated for each input field. With the following line of code
if ($('#company').jqxInput('val').length == 0 && $('#warehouse').jqxInput('val').length == 0) {
you will disable save button only if warehouse and company are empty in the same time.If this does not help you, please, provide us with full sample code including all your jqxInput initializations and html code.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.comMay 13, 2015 at 7:25 am in reply to: Maintain additional field in cells Maintain additional field in cells #71049Hello hh_shan,
You may try to use dataAdapter’s records. For more information you can refer to Grid Data Sources help topic: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm.
I hope it will be helpful to you.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 13, 2015 at 6:53 am in reply to: Weird JS error when exporting my jqxGrid Weird JS error when exporting my jqxGrid #71045Hello Coloco,
I would suggest you update to the latest version of jQWidgets (3.8.0). For more information you may refer to the following forum topic: http://www.jqwidgets.com/community/topic/singlerow-doesnt-work-parsedate-error-in-jqxdata-js/#post-71025.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 12, 2015 at 12:34 pm in reply to: JqxInput event can't get called JqxInput event can't get called #70999Hi cpuin,
Here is an example which shows how to check values in four jqxInput when you set them dynamically: http://jsfiddle.net/u5qjc7vo/. I hope it will be helpful to you.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/May 12, 2015 at 11:41 am in reply to: problem in jqxgrid selectall checkbox!!! problem in jqxgrid selectall checkbox!!! #70991Hello Gopinath BS,
We could not reproduce the reported issue when selecting/unselecting all rows and select single row after that. Please, make sure you are using the latest version of jQWidgets (3.8.0).
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts