jQWidgets Forums

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • san1646
    Participant

    I have updated all the JS as well as CSS files. I will create a JSFiddle and update here.

    THanks,

    in reply to: Nested grid parent element Nested grid parent element #73774

    san1646
    Participant

    gridElement.id gave me the div id for parent grid.
    Sorry if I was not clear earlier, I do not want the parent grid id.
    I want the parent rowidand/or index.

    in reply to: Sum for a calculated-field Sum for a calculated-field #73164

    san1646
    Participant

    Thanks, this seems to solve my issue.

    in reply to: Sum for a calculated-field Sum for a calculated-field #73031

    san1646
    Participant

    Hi Dimitar,

    After doing the changes you said, I did a round of testing and realized this has created a different issue for me.

    I am calculating value using other fields and setting it in the cell for ‘Calc Hrs’ (using setcellvalue).
    But since this is being done in the ready function for the grid, any changes by the user after grid is loaded are not reflected.

    The only way I know to achieve instant reflection in the computed value is via cellsrenderer. But I tried using setcellvalue in there, but the grid does not load.

    Thank you
    Sanket

    in reply to: Sum for a calculated-field Sum for a calculated-field #73014

    san1646
    Participant

    Thank you very much Dimitar!
    I tried it and was able to get it working.

    Can you also tell me how I can add CSS to the computed column using this method (setcellvalue).

    Earlier I used this:
    return “<div style=’margin: 4px; background-color: #FFFF00;’ class=’jqx-center-align’ >” + dataAdapter.formatNumber(total, “f2”) + “</div>”;

    in reply to: Sum for a calculated-field Sum for a calculated-field #72964

    san1646
    Participant

    I tried that, but it is not working.


    san1646
    Participant

    Thanks Dimitar, it worked.


    san1646
    Participant

    Thanks!
    I tried using 3.7.0.
    I am just

    Code here:

    var data = dojo.toJson( this.projectVariable1.getData() ); //getting JSON from a variable
                var currentScope = this; //this.cssSummary.showing = true;
                console.log("(project/data)-"+data);
                
                    //var url = $.parseJSON(data);
                    var url = data;
                    // prepare the data
                    var source =
                    {
                        datatype: "json",
                        datafields: [
                            { name: 'projectId' },
                            { name: 'projectNumber' }
                        ],
                        url: url,
                        async: false
                    };
                    var dataAdapter = new $.jqx.dataAdapter(source);
                    // Create a jqxComboBox
                    $("#jqxWidget").jqxComboBox({ selectedIndex: 0, source: dataAdapter, displayMember: "projectNumber", valueMember: "projectId", width: 200, height: 25});
                    // trigger the select event.
                    $("#jqxWidget").on('select', function (event) {
                        if (event.args) {
                            var item = event.args.item;
                            if (item) {
                                var valueelement = $("<div></div>");
                                valueelement.text("Value: " + item.value);
                                var labelelement = $("<div></div>");
                                labelelement.text("Label: " + item.label);
                                $("#selectionlog").children().remove();
                                $("#selectionlog").append(labelelement);
                                $("#selectionlog").append(valueelement);
                            }
                        }
                    });
                
    			
    <div id='jqxWidget'></div><div style=\"font-size: 12px; font-family: Verdana;\" id=\"selectionlog\"></div></div>

    The data variable (from console)
    [{"addressLine1":"Street 3","addressLine2":"House x","city":"City 1","contractAward":1390366800000,"country":"Funland","customerId":1,"departmentId":1,"enddate":1389243600000,"projectFolder":"1","projectId":1,"projectNumber":"SYS112233","proposaldue":1392786000000,"province":"1","ptsproposalNo":"1","startdate":1392786000000,"state":"AK","stateid":1,"statusId":1,"zipcode":51515},{"addressLine1":"street 5","addressLine2":"House y","city":"City 1","contractAward":1394082000000,"country":"Funland","customerId":2,"departmentId":1,"enddate":1395115200000,"projectFolder":"2","projectId":2,"projectNumber":"SYS223344","proposaldue":1392786000000,"province":"1","ptsproposalNo":"1","startdate":1392699600000,"state":"AK","stateid":1,"statusId":1,"zipcode":65188},{"addressLine1":"street 4","addressLine2":"House z","city":"City 1","contractAward":1392786000000,"country":"Funland","customerId":1,"departmentId":1,"enddate":1393304400000,"projectFolder":"3","projectId":3,"projectNumber":"SYS334455","proposaldue":1391835600000,"province":"1","ptsproposalNo":"1","startdate":1392699600000,"state":"AK","stateid":3,"statusId":1,"zipcode":41581},{"addressLine1":"8","addressLine2":"8","city":"8","contractAward":null,"country":"8","customerId":8,"departmentId":8,"enddate":null,"projectFolder":"","projectId":4,"projectNumber":"SYS445566","proposaldue":null,"province":"8","ptsproposalNo":"","startdate":null,"state":"8","stateid":0,"statusId":0,"zipcode":0},{"addressLine1":"some st","addressLine2":"some apt","city":"Somecity","contractAward":null,"country":"Tomorrowland","customerId":2,"departmentId":1,"enddate":1392872400000,"projectFolder":null,"projectId":5,"projectNumber":"SYS556677","proposaldue":null,"province":"1","ptsproposalNo":"1","startdate":1418187600000,"state":"MI","stateid":null,"statusId":1,"zipcode":90210}]

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