jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: Grid , Filterrow Date format Grid , Filterrow Date format #112242

    antrax13
    Participant

    I dont accept this as an answer as I want to achieve following:

    • have data in grid in dd/MM/yyyy format
    • have a date in filter row in dd/MM/yyyy format

    What Hristo post is working but I dont understand why I need to have

    var dataAdapter = new $.jqx.dataAdapter(source, {
      autoBind: true,
      beforeLoadComplete: function (records) {
        for (i = 0; i < records.length; i++) {
          var element = records[i];
          var newDateArray = element.raisedDate1.split("/");
          var newDate = new Date(newDateArray[2], newDateArray[1] - 1, newDateArray[0]);
          element.raisedDate1 = newDate;
        }
    
        return records;
      }
    });

    if all this bit of code is doing is just changing dd/MM/yyyy to a date fair enough so in order to get rid of that unnecessary code I will pass date as yyyy-MM-dd format and in colums definition I will set cellsformat to “dd/MM/yyyy” why date in grid is still displayed as 2020-06-01 if I specified cellsformat? Looks like all it is setting is format of filter row date column and not the actual data in grid.

    https://jsfiddle.net/t48msgew/

    Very simple task that I want to achieve. Use dd/MM/yyyy in grid data, filter possibly sort to be based on dd/MM/yyyy. I am flexible on passing any date format in datasource to remove Hristo’s workaround.

    in reply to: Grid , Filterrow Date format Grid , Filterrow Date format #112235

    antrax13
    Participant

    Thanks Hristo,

    your solution works but what is so special with my case?

    I would assume that this will work out of the box.

    https://jsfiddle.net/w1hxevps/

    I passed date in yyyy-MM-dd format
    then in colums definition I will specify cellsformat to dd/MM/yyyy but grid still shows date in yyyy-MM-dd format and only filter row has been updated with a new format.

    Seems strange to me

    in reply to: Grid , Filterrow Date format Grid , Filterrow Date format #112221

    antrax13
    Participant

    Here is the link to fiddle: https://jsfiddle.net/69n78uxg/


    antrax13
    Participant

    Hi Hristo,

    https://i.postimg.cc/zv0C9R3x/stillthesameissue.png

    Your solution can replicate my issue. Please have a look at the screenshot from your jsfiddle.

    There are certain points (ORANGE arrow) when these points are selected, Stack bar wont be aligned with X asis (RED ARROWS).

    Thats why I was trying to ask if there is a posibility for a range selector to move/slide in months instead of days.

    Thank you very much for trying to find the solution Hristo much appreciated.
    Our company owns the licence for jqwidgets so we definetely would like and love this feature.

    Maybe just something for you guys to add/consider in next release.

    In the meantime if that will help someone we got rid of zooming chart (range selector) and we have a predefined dates(4 dropdowns = start month, start year, end month & end year) that user can select. User is no longer able to slide to date 15/02/2018 but will be forced to select Start month february and start year = 2018 and this will align chart properly.


    antrax13
    Participant

    If you cant replicate that issue could you post your solution and data somewhere?


    antrax13
    Participant

    01/2013,19,25,17.54,23.89,18766300,23.89
    02/2013,25,25.92,20.27,21.96,8218800,21.96
    03/2013,23,23.1,18.71,19.2,5139800,19.2
    04/2013,20,20,15.83,16.11,6866900,16.11
    05/2013,16.4,16.63,14.98,15.8,6921700,15.8
    06/2013,16.14,17.52,15.57,17.46,7711400,17.46
    07/2013,17.58,17.9,16.55,17.4,4050600,17.4
    08/2013,17.95,18.07,17,17.05,2202500,17.05
    09/2013,17.39,18.64,16.9,18.14,2680100,18.14
    10/2013,17.94,20.15,17.76,19.84,4195200,19.84
    11/2013,19.94,21.5,19,19.89,3739800,19.89
    12/2013,20.7,21.3,20.05,20.64,2621300,20.64
    01/2014,21.37,22.25,20.92,21.91,2486500,21.91
    02/2014,21.85,21.85,20.05,20.3,1825300,20.3
    03/2014,20.66,20.9,19.5,20.22,1252500,20.22
    04/2014,20.5,21.25,20.37,21,957800,21
    05/2014,21.19,21.56,21.06,21.29,653600,21.29
    06/2014,21.5,21.5,20.3,20.95,922200,20.95
    07/2014,20.91,21.18,20.26,20.55,619700,20.55
    08/2014,20.55,20.9,20.51,20.72,467200,20.72
    09/2014,20.77,20.88,20,20.35,616000,20.35
    10/2014,20.2,20.44,19.55,19.94,426900,19.94
    11/2014,20.5,20.97,20.33,20.92,718100,20.92
    12/2014,21,21.95,20.82,21.95,1230500,21.95
    01/2015,21.95,22.18,20.85,21.26,913000,21.26
    02/2015,21.54,21.55,20.05,20.45,796200,20.45
    03/2015,20.1,20.16,19.52,19.59,741900,19.59
    04/2015,19.9,19.98,19.45,19.6,812700,19.6
    05/2015,19.65,19.65,18.82,19.03,1281300,19.03
    06/2015,18.69,18.88,17.85,17.9,797600,17.9
    07/2015,17.8,17.9,17.39,17.6,691000,17.6
    08/2015,18.18,18.45,17.66,18.32,634000,18.32
    09/2015,18.45,18.8,18.26,18.78,485800,18.78
    10/2015,18.96,19.4,18.78,19.15,447900,19.15
    11/2015,19.59,19.59,18.6,18.77,601300,18.77
    12/2015,18.54,19.25,18.33,18.79,579100,18.79
    01/2016,18.65,19.11,18.51,19.1,296000,19.1
    02/2016,19.09,20.39,19,20.13,1088100,20.13
    03/2016,19.25,19.71,18.95,19.2,673100,19.2
    04/2016,19.16,19.98,18.56,19.9,503300,19.9
    05/2016,19.89,20.27,19.6,19.75,433800,19.75
    06/2016,19.75,19.87,19.5,19.7,379600,19.7
    07/2016,19.7,20.19,19.61,19.87,732800,19.87
    08/2016,19.66,19.79,19.33,19.48,201400,19.48
    09/2016,19.62,20.69,19.6,20.45,494900,20.45
    10/2016,20.37,21.24,20.31,21.06,487100,21.06
    11/2016,20.87,21.3,20.66,21.05,434600,21.05

    in reply to: jqxDateTimeInput Wrong Date jqxDateTimeInput Wrong Date #98758

    antrax13
    Participant

    This is not a help I am looking for and it wont fix our issue.

    The issue is with the widget.

    When you type the date 5555-55-55 or 44/44/4444 it will be set to whatever date.

    user did not enter 2100-01-01 they entered 44/44/4444 therefor it is invalid. It should CLEAR the input not to RESET it to some valid date that user did not entered.

    If I am blind and I will type 44/44/4444 I am expecting to save 44/44/4444 not 01/01/2100. Range or min/max wont help.

    What I need is when user type invalid date it will clear input not replace it.

    Maybe add this feature to next release.

    I believe that there is not a simple solution so I will have to implement on focus out.


    antrax13
    Participant

    Stanislav.

    Thanks, it has sorted the order of dropdown filter menu.

    However new issue raised.

    If I remove row that contains value ‘a’ this value is still available for selection in dropdown filter however there is no such a row with this value therefor it should not be there.

    I was expecting to have following values in dropdown filter [‘d’,’b’] not [‘a’, ‘d’, ‘b’].

    Same is happening if I would add into filter value that will not exists [‘a’, ‘d’, ‘b’, ‘value that is not in grid’] then ‘value that is not in grid’ is still showing as an option in dropdown filter.

    So the question is: is there a way to refresh dropdown filter options and get rid of options that are not in grid but still keep the order?

    in reply to: GRID NOT RERENDERING GRID NOT RERENDERING #93486

    antrax13
    Participant

    this has throw new issue….
    with sizing suddenly I have horizontal scrollbar …

    in reply to: GRID NOT RERENDERING GRID NOT RERENDERING #93485

    antrax13
    Participant
    $("#jqxReviewGrid").on('bindingcomplete',function(){
                       $(this).jqxGrid('refresh');
                   });

    this seems to fix it


    antrax13
    Participant

    Thanks Peter it works like a charm.

    Just in case someone will need it here is the code:

    var cellclassname = function (row, columnfield, value, rowdata) {
        if(rowdata.isInTechnique == false){
           return 'red';
        }
    }
    {text: 'id', datafield: 'id', hidden: true},
     {text: firstLevelLabel, datafield: 'firsttag', width: 150, filterable: false, cellclassname: cellclassname},
     {text: 'Has Technique?', datafield: 'isInTechnique', width: 150, filtertype: 'checkedlist', cellclassname: cellclassname}

    each field/cell got cellclassname and based on isInTechnique field I will highlight all cells for that row.

    Thanks


    antrax13
    Participant

    Thanks Peter,

    This will not work unfortanetaly for me because I have in 1 grid 3 checkbox columns.

    But I will take the answer as no so I can think of other solution.

    in reply to: cellclassname, refresh color cellclassname, refresh color #91311

    antrax13
    Participant

    this actually works but I am just being stupid 😀

    in reply to: Reload of grid Reload of grid #91303

    antrax13
    Participant

    Hi thanks this is now solved and slighly updated.

    I was trying to get data again passing new parameter.

    Everything works now see updated code: http://www.jqwidgets.com/community/topic/cellclassname-refresh-color/

    Please see the link above now I have a problem with reloading colors.

    Because on document ready it will set the cellclassname color to yellow and when I reload grid it is still keeping yellow color however I am expecting red.

    So $(".redAnomalies").click(function(){ ... } suppose to reload data source but colors are not updated, just data.


    antrax13
    Participant

    yes sorry for mistake, i am confused tbh with name because website name is jqwidget but everything is jqx….

    anyway thanks for your reply but it didnt help me but I have workaround.

    I was trying to export to excel (.xlsx not .xls) so I was trying to get all hidden IDs and pass it to excel class to generate excel file.

    However now I am passing json with all visible data so hidden fields are not needed.

Viewing 15 posts - 1 through 15 (of 15 total)