jQWidgets Forums
Forum Replies Created
-
Author
-
June 25, 2014 at 10:53 am in reply to: Getting Error with Assembling N-Nested jQuery Grid Getting Error with Assembling N-Nested jQuery Grid #56339
Thanks for reply
We have check with console log and getting log value 0 .
And then after next line we are getting below error.
Uncaught Error: Invalid jQuery Selector! Please, check whether the used ID or CSS Class name is correct.
Thanks
AlpeshJune 25, 2014 at 9:25 am in reply to: Getting Error with Assembling N-Nested jQuery Grid Getting Error with Assembling N-Nested jQuery Grid #56333Hi Dimitar,
Could you please check it below code ?? Is it correct or wrong ? because we are still facing error .
var theme=''; var data = new Array(); var firstNames = [ "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene" ]; var lastNames = [ "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier" ]; var productNames = [ "Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist" ]; var priceValues = [ "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0" ]; for (var i = 0; i < 10; 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" }; $("#jqxgrid").bind('bindingcomplete', function (event) { if (event.target.id == "jqxgrid") { $("#jqxgrid").jqxGrid('beginupdate'); var datainformation = $("#jqxgrid").jqxGrid('getdatainformation'); for (i = 0; i < datainformation.rowscount; i++) { var hidden = i > 0 ? true : false; $("#jqxgrid").jqxGrid('setrowdetails', i, "<div id='grid" + i + "' style='margin: 10px;'></div>", 220, hidden); } $("#jqxgrid").jqxGrid('endupdate'); } }); var dataAdapter = new $.jqx.dataAdapter(source); // creage jqxgrid // set rows details. // create nested grid. var initlevel2 = function (index) { console.log(index); var grid = $($.find('#grid' + index)); grid.bind('bindingcomplete', function (event) { if (event.target.id == "grid" + index) { grid.jqxGrid('beginupdate'); var datainformation = grid.jqxGrid('getdatainformation'); for (var i = 0; i < datainformation.rowscount; i++) { var hidden = true; grid.jqxGrid('setrowdetails', i, "<div id='subgrid" + i + "' style='margin: 10px;'></div>", 220, hidden); } grid.jqxGrid('endupdate'); } }); if (grid != null) { var dataAdapter = new $.jqx.dataAdapter(source); grid.jqxGrid({ rowdetails: true, initrowdetails: initlevel3, source: dataAdapter, theme: theme, width: 600, height: 200, 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', cellsalign: 'right' } ] }); }else{ console.log('test'); } } var initlevel3 = function (index) { var grid = $($.find('#subgrid' + index)); console.log(grid); var dataAdapter = new $.jqx.dataAdapter(source); if (grid != null) { grid.jqxGrid({ source: dataAdapter, theme: theme, width: 530, height: 200, 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', cellsalign: 'right' } ] }); } } $("#jqxgrid").jqxGrid( { width: 670, height: 365, source: dataAdapter, theme: theme, rowdetails: true, initrowdetails: initlevel2, 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', cellsalign: 'right', minwidth: 100, cellsformat: 'c2' } ] });
Thanks,
AlpeshMay 6, 2014 at 6:40 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #54017Thanks Peter,
This is my last question.
Right now i am using version ‘jQWidgets v3.1.0’
Is there any old version problem for below error?
Uncaught TypeError: Cannot read property 'length' of undefined
Thanks,
AlpeshMay 6, 2014 at 6:09 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #54010Thanks for reply Peter.
I have tried with above example in my local.but error getting on Search button click.below error showing on chrome browser console.
Uncaught TypeError: Cannot read property 'length' of undefined
Could you please help us ?Thanks,
AlpeshMay 6, 2014 at 5:43 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #54004Hello Peter,
We are getting error below like error.When we click on search button.
Uncaught TypeError: Cannot read property 'length' of undefined
Thanks,
AlpeshMay 6, 2014 at 4:22 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #53998Hello Peter,
Could you please help us for above question’s answer ??
Thanks,
AlpeshMay 5, 2014 at 9:45 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #53943Thanks Peter.
Yes,it’s working on local data.but We are facing that issue on retrieving server side data.When we click on search button that time we need to only two column.but table display previous column with empty data. we want remove empty column data.
Could you please help for how to remove empty column when we set server data Source on table ?
Thanks,
AlpeshMay 5, 2014 at 8:24 am in reply to: jqXDatatable column Dynamically reload and Change issue jqXDatatable column Dynamically reload and Change issue #53936Thanks Peter.
Could you please check below test code run it your local and let us know ?
<!DOCTYPE html> <html lang="en"> <head> <title>Table</title> <link rel="stylesheet" href="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="http://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqx-all.js"></script> <script type="text/javascript"> var that = this; $(document).ready( function() { var data = new Array(); var firstNames = [ "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"]; var lastNames = [ "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"]; var productNames = [ "Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist"]; var priceValues = [ "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0"]; for (var i = 0; i < 200; 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", dataFields: [{ name: 'firstname', type: 'string' }, { name: 'lastname', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'quantity', type: 'number' }, { name: 'total', type: 'number' }] }; var dataAdapter = new $.jqx.dataAdapter(source); $("#table").jqxDataTable({ width: 670, pageable: true, theme: 'energyblue', editable: true, pagerButtonsCount: 10, source: dataAdapter, columnsResize: true, columns: [{ text: 'Name', dataField: 'firstname', width: 100 }, { text: 'Last Name', dataField: 'lastname', width: 100 }, { text: 'Product', editable: false, dataField: 'productname', width: 180 }, { text: 'Quantity', dataField: 'quantity', width: 80, cellsAlign: 'right', align: 'right' }, { text: 'Total', dataField: 'total', cellsAlign: 'right', align: 'right', cellsFormat: 'c2' }] }); $('#saveSearch').click(function(e) { var source = { localData: data, dataType: "array", dataFields: [{ name: 'firstname', type: 'string' }, { name: 'price', type: 'number' } ] }; var dataAdapter = new $.jqx.dataAdapter(source); $("#table").jqxDataTable({ width: 670, pageable: true, theme: 'energyblue', editable: true, pagerButtonsCount: 10, source: dataAdapter, columnsResize: true, columns: [{ text: 'Name', dataField: 'firstname', width: 100 }, { text: 'Unit Price', dataField: 'price', width: 90, cellsAlign: 'right', align: 'right', cellsFormat: 'c2' } ] }); }); }); </script> </head> <body> <div id="table"></div> <br/> <input type="button" value="Search" name="saveSearch" id="saveSearch" class="jqxButton jqx-rc-all jqx-button jqx-widget jqx-fill-state-normal" role="button" aria-disabled="false" style="width: 80px;"> </body> </html>
Thanks
AlpeshApril 25, 2014 at 11:16 am in reply to: DataAdapter Data Send to server get empty DataAdapter Data Send to server get empty #53577Thanks Peter ,
February 13, 2014 at 9:17 am in reply to: Onclick button to Clear jqxDateTimeInut Field Onclick button to Clear jqxDateTimeInut Field #49457Thanks Peter.
February 13, 2014 at 6:21 am in reply to: Onclick button to Clear jqxDateTimeInut Field Onclick button to Clear jqxDateTimeInut Field #49439Thanks for reply.
Right now we have setDate Property like below code On button Click.But it is not working.
$("#advClear").on('click', function (event) { $('#first_used_date').jqxDateTimeInput('setDate', null); });
Could you please help us for ?
Thanks,
AlpeshFebruary 12, 2014 at 6:44 am in reply to: Default Empty value for jqxDataTime Input. Default Empty value for jqxDataTime Input. #49351Thanks Dimitar.
January 27, 2014 at 8:40 am in reply to: How we can validate jqxDropdownList ? How we can validate jqxDropdownList ? #48419Thank you Dimitar,
Thanks,
AlpeshJanuary 18, 2014 at 8:25 am in reply to: Dropdown value selected issue in loop Dropdown value selected issue in loop #48046Hello Peter,
thanks for reply.
Right now,we have solved our issue.Thanks,
AlpeshJanuary 16, 2014 at 10:59 am in reply to: jqxDropDownList set multiple item selected jqxDropDownList set multiple item selected #47948Thanks Peter.
I got the solution of dynamically check selected item using below link example.
Example: http://jsfiddle.net/jqwidgets/HgHaN/ -
AuthorPosts