jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 111 total)
  • Author
    Posts
  • in reply to: Label at Grouping Label at Grouping #65749

    simcon94
    Participant

    i found following :

    ********* REMOVED CODE DUE TO EULA VIOLATION **************

    This works…….

    in reply to: Label at Grouping Label at Grouping #65721

    simcon94
    Participant

    No idea?

    in reply to: Label at Grouping Label at Grouping #65663

    simcon94
    Participant

    i try this way:

    
     var data = generatedata(500);
    var countries = [
                     { value: "AF", label: "Afghanistan" },
                     { value: "AL", label: "Albania" },
                     { value: "DZ", label: "Algeria" },
                     { value: "AR", label: "Argentina" },
                     { value: "AM", label: "Armenia" },
                     { value: "UK", label: "United Kingdom" },
                     { value: "US", label: "United States" }
                ];
                var countriesSource =
                {
                     datatype: "array",
                     datafields: [
                         { name: 'label', type: 'string' },
                         { name: 'value', type: 'string' }
                     ],
                     localdata: countries
                };
                var countriesAdapter = new $.jqx.dataAdapter(countriesSource, {
                    autoBind: true
                });
     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 groupcolumnrenderer = function (text) {
        console.log(text);
          if (text === 'Country') {
              return 'Land';
          } else {
              return text;
          }
      }
    
     var adapter = new $.jqx.dataAdapter(source);
     $("#jqxgrid").jqxGrid({
         width: 500,
         theme: 'energyblue',
         source: adapter,
               groupcolumnrenderer: groupcolumnrenderer,
          groupable: true,
         groups: ['countryCode'],
          //groupsrenderer: groupsrenderer,
         editable: true,
         columns: [{
             text: 'First Name',
             datafield: 'firstname',
             width: 90,
             columntype: 'dropdownlist'
         }, {
             text: 'Last Name',
             datafield: 'lastname',
             width: 90
         }, {
             text: 'Product',
             datafield: 'productname',
             width: 170
         }, {
             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'
         },{
                   text: 'Country', datafield: 'countryCode', displayfield: 'Country', columntype: 'dropdownlist',
                            createeditor: function (row, value, editor) {
                                editor.jqxDropDownList({ source: countriesAdapter, displayMember: 'label', valueMember: 'value' });
                            }}
                  ]
     });

    Then it works, when you load the grid.
    When you close the group and group Country again, it doesn’t work…..

    in reply to: Label at Grouping Label at Grouping #65657

    simcon94
    Participant

    Hmm…when you create the column this way:

    , {
                            text: '@Resources.MeterType.MeterTypeModel_Unit', columntype: 'dropdownlist', displayfield: 'Unit', datafield: "UnitId", placeHolder: "Bitte wählen", filtertype: 'checkedlist', width: 150,
                            validation: function (cell, value) {
                                if (value) {
                                    return true;
                                }
                                return { result: false, message: "@Resources.CostCenter.Error_Grid_Number" };
                            }
                            , createeditor: function (row, cellvalue, editor) {
                                editor.jqxDropDownList({ source: dataAdapterUnit, displayMember: 'Symbol', valueMember: 'Id', placeHolder: "Bitte wählen", dropDownHeight: 100 });
                            },
                        }

    It doenst work

    in reply to: Label at Grouping Label at Grouping #65652

    simcon94
    Participant

    It is very simple to reporduce it.
    Take a grid with a columntype: ‘dropdownlist’.
    Group this column and you will see the problem

    in reply to: Label at Grouping Label at Grouping #65631

    simcon94
    Participant

    But now, i have the probelm at groupsrenderer.
    There is always “State” as Label.
    And i get an Error:
    TypeError: data.groupcolumn is null

    in reply to: Label at Grouping Label at Grouping #65630

    simcon94
    Participant

    so i implemented this workaround:
    var groupcolumnrenderer = function (text) {
    var toCheck = “”;
    if (typeof text === ‘string’) {
    return text;
    } else {
    for (var i = 0; i < text.length; i++) {
    toCheck += text[i];
    }
    if (toCheck === ‘State’) {
    return ‘@Resources.State’;
    } else if (toCheck === ‘Country’) {
    return ‘@Resources.Country’;
    }
    }
    }

    in reply to: Label at Grouping Label at Grouping #65629

    simcon94
    Participant

    I am not sure, that the label is default the “text”.
    When the Cloumn is columntype: ‘dropdownlist’, then he takes always the displayfield.
    When i call groupcolumnrenderer, then i get an array the value from displayfield….
    0 “U”
    1 “n”
    2 “i”
    3 “t”

    When the column isn’t ‘dropdownlist’, then i get an string…

    in reply to: jqxSwitchButton disabled jqxSwitchButton disabled #65502

    simcon94
    Participant

    Do you have an example?

    in reply to: getselectedcells always 1 getselectedcells always 1 #64257

    simcon94
    Participant

    The Problem is, that the mouseup Event is faster then the selection event….

    in reply to: Dynamic DataTable Dynamic DataTable #64252

    simcon94
    Participant
    $("#matrix").mouseup(function () {
                cells = $("#matrix").jqxGrid("getselectedcells");
                console.log("Seleted Cells:  " +cells.length);     
           });

    SELECTED CELLS IS ALWAYS 1….hmmmmmm

    in reply to: Dynamic DataTable Dynamic DataTable #64231

    simcon94
    Participant

    Sorry, have grid.
    Do you have an example?

    $("#matrix").mouseup(function() {            
                var groupsSize = $("#Matrix_Groups").val();            
               if (cells.length > groupsSize) {
                    $("#matrix").jqxGrid('clearselection');                    
                } else if (cells.length === groupsSize) {
                    $("#popUpBit").jqxWindow('open');
                }

    I tried this way.
    This is OK, when you selected the cell with CTRL and Mouse Click. But not, when you select the cell with mouse and pressed mouse button….

    in reply to: Dynamic DataTable Dynamic DataTable #64212

    simcon94
    Participant

    I wanna do something like this:

    //CELLSELECT EVENT
            $("#matrix").bind("cellselect", function (event) {
                cells = $("#matrix").jqxGrid("getselectedcells");
                var groupsSize = $("#Matrix_Groups").val();
                if (cells.length === groupsSize) {
                    console.log("READY");
                }
                else if (cells.length > groupsSize) {
                    $("#matrix").jqxGrid('clearselection');
                } 
            });
    

    The console.log() fires every time, when the selction == groupSize.
    I only want to have this condition, when my selection is finished(mouse event)

    in reply to: Dynamic DataTable Dynamic DataTable #64207

    simcon94
    Participant

    OK.
    Can i get the “getselectedcells” without a button click?
    I wanted to know, how many cells i selected.
    I have this mode:
    .jqxGrid(“selectionmode”, “multiplecellsextended”);

    in reply to: hideSeries and Y-Axis reload hideSeries and Y-Axis reload #63564

    simcon94
    Participant

    I found it….
    only set Axis to ‘auto’, without unitInterval, minValue and maxValue….

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