jQWidgets Forums
Forum Replies Created
-
Author
-
July 17, 2023 at 12:17 pm in reply to: Save status with sortmode=many Save status with sortmode=many #133376
Hi Marco,
To minimize the requests you can create an “updating” global variable. When updating multiple columns set it to true. Then in the dataAdapter, check if it is true before making the request. Here is an example:
The sort will not execute if updating is truevar source = { datatype: "array", localdata: {}, totalrecords: 1000000, sort: function () { if(updating){return;} // update the grid and send a request to the server. $("#jqxgrid").jqxGrid('updatebounddata', 'sort'); } };
Then you can update the sorting in this way:
updating = true $("#jqxgrid").jqxGrid('sortby', 'col1', 'asc'); $("#jqxgrid").jqxGrid('sortby', 'col2', 'asc'); updating = false $("#jqxgrid").jqxGrid('sortby', 'col3', 'asc');
Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/Hi durian,
The date formatting should be set with the ‘cellsformat’ property. The cellsrenderer property has no effect during the export.
Here is an example with a dd/MM/yyyy HH:mm format – https://jseditor.io/?key=jqwidgets-grid-ver-7Additionally, depending on the date format, you might have to adjust the date values before export, since Excel transforms them in the UTC timezone, which might cause the exported file to contain different values than the grid. The workaround is included in the example above.
Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.com/Hi durian,
Can you please share an example of the Grid’s settings? The format is exporting correctly in the Export demos on our site.
Have you marked the date datafield withtype: 'date'
in the dataAdapter?Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.com/May 30, 2023 at 11:44 pm in reply to: Remove sorting and filtering applied on columns at once Remove sorting and filtering applied on columns at once #133110Hi anichifor3pg,
Thank you for the feedback! You can avoid this issue by setting “async: false” to the sourve object. For example:
var source = { async: false, datatype: "json", url: muURL, ..... }
Then, you can rewrite your functions in the following way:
$("#jqxGrid").on("bindingcomplete", function () { if (initialGridState === null) { initialGridState = $("#jqxGrid").jqxGrid("savestate"); } }); function resetGridState() { $('#jqxGrid').jqxGrid('loadstate', initialGridState); $("#jqxGrid").jqxGrid("removesort"); }
Best Regards,
Ivan PeevskijQWidgets team
http://www.jqwidgets.com/February 17, 2023 at 12:01 pm in reply to: Multi pre Select ComboBox Multi pre Select ComboBox #132605Hi rmk3200,
Please see the example here: stackblitz
You can set selection inside of the “loadComplete” function of the dataAdapter. By the time it is called, the combobox will already exist
Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.com/February 14, 2023 at 2:16 pm in reply to: add eventlistener onRowclick after component is first time rendered add eventlistener onRowclick after component is first time rendered #132568Hi kashehi,
There are two possible approaches for achieving that:
1. during the render, set CellGridKartableClick to be an empty function. Then inside of useEffect, you can set CellGridKartableClick to the actual function you want to use.
2. Create a boolean variable , for example “rendered = false”. Then inside useEffect, set “rendered = true”. And finally, at the top of the CellGridKartableClick function add a check for rendered and stop the function if it is false. For example:
if(!this.rendered){return;}Depending on your use case, there might also be other approaches
Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.com/February 6, 2023 at 11:53 am in reply to: jqxGrid with large data(AJAX) jqxGrid with large data(AJAX) #132309Hi Rob,
If you don’t wish to use paging, another alternative is to set autoheight: false and height:400(or any other number). When the height of the Grid is fixed, you can scroll through the rows with a scrollbar and the Grid will load only the visible rows, this should drastically increase the performance.
When the Grid is in virtualmode, sorting and filtering should be implemented as additional functions in the dataAdapter, since the idea of the virtual mode is that the Grid only loads data on demand and doesn’t have access to the entire dataset and therefore doesn’t know which rows should come first.
We have guide on how to achieve this here:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging-and-sorting.htm?search=Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/November 1, 2022 at 3:00 pm in reply to: jqGrid Group Renderer not working jqGrid Group Renderer not working #123786Hi Prashant,
Thanks for the feedback.
If the main benefit of the ‘groupchanged’ Event is the groups array, you can also get the same array in the groupsrenderer with
$('#jqxGrid').jqxGrid('groups');
orthis.myGrid.groups
(for Angular)The second issue is avoiding recalculations in each function call – you can check whether the groups array is different from the previous time the function was called and use this as a new ‘groupchanged’ event.
I have attached an Angular demo here: stackblitz
I have also opened a work item for that and we will consider if we can make the order of the event and the renderer more consistent.
Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/October 31, 2022 at 7:41 pm in reply to: jqGrid Group Renderer not working jqGrid Group Renderer not working #123782Hi Prashant,
Unfortunately it’s not possible to switch the order of the events.
However if I understood you correctly, this sounds like something that could be done using just the groupsrenderer, since the data argument provides all records in the groupPlease have a look at the example here: jsfiddle
Each group row will display the percentage of rows withrouted==true
out of the total rows in the groupPlease let me know if this works for you!
Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/September 29, 2022 at 5:24 pm in reply to: update data from the server:jqxscheduler update data from the server:jqxscheduler #122592Hi KevinMbitkebeyo,
If the ids in your server are just indexes like 1, 2, 3,… and an item in your source looks something like this:
{ "id": 1, "isActive": true, "status": "busy", "name": "Mollie Langley", "style": "#0069A5", "about": "Message", "start": "2016-11-26 12:30", "end": "2016-11-26 17:30" },
Then you need just to set
{ name: 'id', type: 'number' }
in source->datafieldsBest regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.comHi priyamsharma2704,
Can you please share a code sample that causes the issue?
As you can see in the example here, there shouldn’t be any offset no matter what is the number of rows.
Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/Hi narnone,
Thanks for the example. In your project -> sections.min.js, function fn_set_container_height_widths,
you should replace:
document.getElementById('svHLSM_Splitter_Sections').style.overflow = 'auto';
with
document.getElementById('svHLSM_Splitter_Sections').style.overflow = 'overlay';
This should fix the issue.
Best regards,
Ivan PeevskijQWidgets Team
https://www.jqwidgets.com/September 7, 2022 at 12:33 pm in reply to: Dropdownlist filter not editable on Modal window Dropdownlist filter not editable on Modal window #122474Hi,
The
tabindex="-1"
attribute prevents all elements outside the modal from being focused.
You will see that when you remove it, the filtering field will be enabled.If you have any other questions, please do not hesitate to contact us again!
Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.comAugust 29, 2022 at 5:52 pm in reply to: Export can't be opened by Excel Export can't be opened by Excel #122424Hi Ola,
Please provide us with more information. For example, what is the error message?
If you receive the following message: “The file you are trying to open, ‘file_name.xls’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening this file. Do you want to open the file now?”
The reason of this warning message is explained in details in the following post: excel-2007-extension-warningFor ‘xlsx’ export, use the ‘exportview’ method instead.
Best Regards,
Ivan Peevski
jQWidgets team
https://www.jqwidgets.comAugust 26, 2022 at 1:41 pm in reply to: Dynamically Adding a Filter Produces Error Dynamically Adding a Filter Produces Error #122404Hi Chuck,
Thank you for contacting us!
This is indeed the expected behavior. The filters shouldn’t be set until after the grid has been initialized.
You can have a look at our Initial Filter demo. The initial filters are set in the ready callback function.I hope this was of help, if you have any other questions, please do not hesitate to contact us again.
Best regards,
Ivan Peevski
jQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts