jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 141 total)
  • Author
    Posts

  • ivanpeevski
    Participant

    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 true

     var 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 Peevski

    jQWidgets Team
    https://www.jqwidgets.com/

    in reply to: Export to Excel Export to Excel #133307

    ivanpeevski
    Participant

    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-7

    Additionally, 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/

    in reply to: Export to Excel Export to Excel #133277

    ivanpeevski
    Participant

    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 with type: 'date' in the dataAdapter?

    Best regards,
    Ivan Peevski
    jQWidgets Team
    https://www.jqwidgets.com/


    ivanpeevski
    Participant

    Hi 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 Peevski

    jQWidgets team
    http://www.jqwidgets.com/

    in reply to: Multi pre Select ComboBox Multi pre Select ComboBox #132605

    ivanpeevski
    Participant

    Hi 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/


    ivanpeevski
    Participant

    Hi 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/

    in reply to: jqxGrid with large data(AJAX) jqxGrid with large data(AJAX) #132309

    ivanpeevski
    Participant

    Hi 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 Peevski

    jQWidgets Team
    https://www.jqwidgets.com/


    ivanpeevski
    Participant

    Hi 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'); or this.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 Peevski

    jQWidgets Team
    https://www.jqwidgets.com/


    ivanpeevski
    Participant

    Hi 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 group

    Please have a look at the example here: jsfiddle
    Each group row will display the percentage of rows with routed==true out of the total rows in the group

    Please let me know if this works for you!

    Best regards,
    Ivan Peevski

    jQWidgets Team
    https://www.jqwidgets.com/


    ivanpeevski
    Participant

    Hi 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->datafields

    Best regards,
    Ivan Peevski

    jQWidgets Team
    https://www.jqwidgets.com

    in reply to: Context Menu on Grid Context Menu on Grid #122591

    ivanpeevski
    Participant

    Hi 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 Peevski

    jQWidgets Team
    https://www.jqwidgets.com/

    in reply to: Scrollbar is hidden Scrollbar is hidden #122498

    ivanpeevski
    Participant

    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 Peevski

    jQWidgets Team
    https://www.jqwidgets.com/


    ivanpeevski
    Participant

    Hi,

    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.com


    ivanpeevski
    Participant

    Hi 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-warning

    For ‘xlsx’ export, use the ‘exportview’ method instead.

    Best Regards,
    Ivan Peevski
    jQWidgets team
    https://www.jqwidgets.com


    ivanpeevski
    Participant

    Hi 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/

Viewing 15 posts - 31 through 45 (of 141 total)