jQWidgets Forums
Forum Replies Created
-
Author
-
Hi poiuy,
I have managed to recreate the situation in the demo you have shared and you need to make sure that you have included the scripts for the data exporting in your index.html file I have tested locally your situation and adding those scripts fixes this problem.For example take a look a this demo
https://www.jqwidgets.com/angular/angular-grid/#https://www.jqwidgets.com/angular/angular-grid/angular-grid-dataexportview.htmOr in this code snippet in which I used the code from the example you shared
//In your HTML file<body> <app-root></app-root> <!-- Scripts you need to add --> <script src="runtime-es2015.js" type="module"></script><script src="polyfills-es2015.js" type="module"></script><script src="runtime-es5.js" nomodule></script><script src="polyfills-es5.js" nomodule></script><script src="main-es2015.js" type="module"></script><script src="main-es5.js" nomodule></script> <script> window.onload = function() { const script = document.createElement('script'); script.type = "text/javascript"; script.src="https://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqxexport.js"; document.body.appendChild(script); } </script> <!-- JSZip --> <script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/jszip.min.js"></script> <!-- pdfmake --> <script src="runtime-es2015.js" type="module"></script><script src="polyfills-es2015.js" type="module"></script><script src="runtime-es5.js" nomodule></script><script src="polyfills-es5.js" nomodule></script><script src="main-es2015.js" type="module"></script><script src="main-es5.js" nomodule></script> <script> window.onload = function() { const script = document.createElement('script'); script.type = "text/javascript"; script.src="https://www.jqwidgets.com/jquery-widgets-demo/jqwidgets/jqxexport.js"; document.body.appendChild(script); } </script> <!-- JSZip --> <script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/jszip.min.js"></script> <!-- pdfmake --> <script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/pdfmake.min.js"></script> <script type="text/javascript" src="https://www.jqwidgets.com/jquery-widgets-demo/scripts/vfs_fonts.js"></script> </body>
Best Regards,
Yavor Dashev
jQWidgets team
https://www.jqwidgets.comFebruary 1, 2021 at 12:31 pm in reply to: Paging with jqxGrid using PHP and PDO postgresql Paging with jqxGrid using PHP and PDO postgresql #114383Hi robin,
Would you like to share whats the data returned from the server in order to help you solve your problem and to check if it comes from the ‘grid’ component more particular ‘beforeprocessing’ and ‘rendergridrows’.
Please, do not hesitate to contact us if you have any additional questions.Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/Hi parthrawal,
In order to be able to give you the best solution the best option will be to share a code example of your situation.
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor DashevjQWidgets Team
https://www.jqwidgets.com/January 29, 2021 at 12:16 pm in reply to: Grid shakes up and down when mouse click on the radio button in the scroll grid Grid shakes up and down when mouse click on the radio button in the scroll grid #114351Hi misocap,
We had a more detailed look on your case and we have made ‘work item’ for it and we are going to work on it.
Thank you for your patience and corporation.
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 25, 2021 at 1:16 pm in reply to: grid columntype is checkbox value change no first trigger cellbeginedit grid columntype is checkbox value change no first trigger cellbeginedit #114301Hi toonice,
If you want to get the modified column name you can do it for example like this:
$("#grid").on("cellendedit", function (event) { editCellName = event.args.datafield; _value=event.args.value editedDataField = event.args.datafield; console.log('This is the column that has been modified:', editedDataField) });
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 25, 2021 at 9:01 am in reply to: Grid shakes up and down when mouse click on the radio button in the scroll grid Grid shakes up and down when mouse click on the radio button in the scroll grid #114291Hi misocap,
For your first question:
If you want to use the ‘setcellvalue’ to update the several columns you have to use it multiple times in order to update several columns.
But one solution for you could be to have an ‘update’ button like in the jsfiddle you shared in your first post and in the ‘oncellclick’ function to get the ‘datafield’ in different columns by clicking them(for example) which will select them then when clicking the button to update them or updating the cells(after clicking on them) in different columns when clicking the ‘radio button’:$("#jqxgrid").on("cellclick", function (event) { $("input").click(function(){ var rowIndex = event.args.rowindex; var datafield = event.args.datafield; var column = $('#jqxgrid').jqxGrid('getcolumn', datafield) $("#jqxgrid").jqxGrid('setcellvalue', rowIndex, datafield, "zzzzzz change"); }) })
For your second question I would like to know if the solution I gave you have worked out for your case.
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 25, 2021 at 8:30 am in reply to: grid columntype is checkbox value change no first trigger cellbeginedit grid columntype is checkbox value change no first trigger cellbeginedit #114288Hi toonice,
From the code you shared I see that you want to get the id of the cell and its value when its clicked.
So I would suggest to use the arguments you pass in the ‘updaterow’ function.
Here is the code changes in the ‘update’ row function:updaterow: function (rowid, rowdata, commite ) { //when chexbox change vlaue not get edit cell name,is null. //first trigger updaterow,after trigger cellbeginedit,cellendedit,current get not edit cell name //trigger event order 1 editCellName = rowid; _value = rowdata; //console.log("edit cell name=" + editCellName + " value=" + _value); console.log('This is the value of the cell',_value); console.log('This is the id of the cell',editCellName); editCellName = ""; }
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 22, 2021 at 2:07 pm in reply to: Grid shakes up and down when mouse click on the radio button in the scroll grid Grid shakes up and down when mouse click on the radio button in the scroll grid #114281Hi misocap,
I was able to recreate the problem you mentioned from the jsfiddle.
If you want to change the text inside the cell its better to use the built in method ‘setcellvalue’.
Here is a code snippet of its usage also using it the ‘grid’ component doesn’t ‘shake’.<body> <script> $(document).ready(function () { var data = generatedata(500); var source = { localdata: data, datafields: [{ name: 'firstname', type: 'string' }, { name: 'lastname', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'date', type: 'date' }, { name: 'quantity', type: 'number' }, { name: 'price', type: 'number' }], datatype: "array" }; var renderlist = function (row, columnfield, value, defaulthtml, columnproperties) { return '<input type=radio id="rs_'+row+'" name ="rs_'+row+'" /> <label class="rdo_label" for="rs_'+ row+'">'+value+'</value> ' }; var adapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid({ width: 600, theme: 'energyblue', source: adapter, sortable: true, ready: function () { $("#jqxgrid").jqxGrid('selectrow', 0); }, columns: [{ text: 'First Name', datafield: 'firstname', width: 90 }, { text: 'Last Name', datafield: 'lastname', width: 90 }, { text: 'Product', datafield: 'productname', width: 170, cellsrenderer: renderlist }, { text: 'Order Date', datafield: 'date', width: 160, cellsformat: 'dd-MMMM-yyyy' }, { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' }, { text: 'Unit Price', datafield: 'price', cellsalign: 'right', cellsformat: 'c2' }], }); $("#jqxgrid").on("cellclick", function (event) { $("input").click(function(){ var rowIndex = event.args.rowindex; $("#jqxgrid").jqxGrid('setcellvalue', rowIndex,'productname', "zzzzzz change"); }) }) }); </script> <style> input{ margin-top: auto; margin-bottom:auto; align-self: center; } </style> <div id='jqxWidget'> <div id="jqxgrid"></div> </div> <div style="margin-top: 10px;"> <input id="updaterowbutton" type="button" value="Update Selected Row" /> </div> </body>
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 22, 2021 at 10:32 am in reply to: grid columntype is checkbox value change no first trigger cellbeginedit grid columntype is checkbox value change no first trigger cellbeginedit #114278Hi, toonice
I was unable to recreate the problem with not triggering cellbeginedit,cellendedit,cellvaluechanged events with the code snippet you have shared in first post.
However the problem in the code you shared is in the ‘updaterow’ function.When the EditCellName is ‘f2’ you call the ‘updaterow’ function again and this is the reason why the checkbox does not change its value. Instead in the ‘updaterow’ function should look like this:updaterow: function (rowid, rowdata, commit) { //when ceckbox change value editCellName is null if (editCellName === ‘f2’) { commit(true) } }
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 22, 2021 at 10:28 am in reply to: grid columntype is checkbox,not trigger cellbeginedit cellendedit event! grid columntype is checkbox,not trigger cellbeginedit cellendedit event! #114277Hi, toonice
I was unable to recreate the problem with not triggering cellbeginedit,cellendedit,cellvaluechanged events with the code snippet you have shared in first post.
However the problem in the code you shared is in the ‘updaterow’ function.When the EditCellName is ‘f2’ you call the ‘updaterow’ function again and this is the reason why the checkbox does not change its value. Instead in the ‘updaterow’ function should look like this:` updaterow: function (rowid, rowdata, commit) {
//when ceckbox change value editCellName is null
if (editCellName === ‘f2’) {
commit(true)
}
}`Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 21, 2021 at 8:50 am in reply to: grid columntype is checkbox,not trigger cellbeginedit cellendedit event! grid columntype is checkbox,not trigger cellbeginedit cellendedit event! #114271Hi, toonice
Would you like to share piece of your code in order to recreate the case you have encountered because I was unable to simulate the error you have mentioned.
Also which version of the grid component do you use?Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
jQWidgets Team
https://www.jqwidgets.com/January 18, 2021 at 3:34 pm in reply to: jqxgrid how to handle carriage return in json jqxgrid how to handle carriage return in json #114244Hi billelmehdi,
You can use the ‘cellsrenderer’ function if you want to add new line the cell for example.
This is a code snippet with an examplevar data = ‘[{“id”:1,”description”:”bla bla blo blo “}]’; // just an example
var servicesSource = {
datatype: “json”,
localdata: data,
datafields: [{
name: ‘id’,
type: ‘number’
}, {
name: ‘description’,
type: ‘string’
}]
};
// cellsrenderer function
var cellsrenderer = function (row, columnfield, value, defaulthtml, columnproperties, rowdata) {
return ‘<span style=” color:blue;”>’ +'<br>’+ value +'<br>’ + ‘</span>’;
}
var servicesDataAdapter = new $.jqx.dataAdapter(servicesSource);
$(“#servicedetailsgrid”).jqxGrid({
width: 800,
source: servicesDataAdapter,
selectionmode: ‘singlerow’,
editmode: ‘selectedrow’,
columns: [
{text: ‘id’, datafield: ‘id’, width: 50, },
{text: ‘Description’,datafield:’description’, columntype: ‘textbox’, width: ‘18%’, editable: false ,cellsrenderer: cellsrenderer,}]
});});
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor DashevjQWidgets team
https://www.jqwidgets.comJanuary 14, 2021 at 1:17 pm in reply to: dragging content between two jqx components dragging content between two jqx components #114225Hi kaltura,
As I mentioned in a another post in a forum thread you started in http://www.htmlelements.com/ we don’t have a component that supports this type of functionality.
In the htmlelements forum you had a post regarding an API issue after I provided you with solution for dragging from one component to another and I think the best solution will be to share some of your code to help you find a solution for you.Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor DashevSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts