jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • in reply to: Different currencies / row Different currencies / row #12456

    grmbl
    Member

    Nevermind, found a fix.

    var pricecellrenderer = function (row, columnfield, value, defaulthtml, columnproperties) {
    var dataRecord = $("#ordergrid").jqxGrid('getrowdata', row);
    var curvalue = dataRecord.OHPCUR;
    value = value.toFixed(2);
    switch (curvalue) {
    case 'EUR':
    value = '€ ' + value;
    break;
    case 'PLN':
    value = 'zł ' + value;
    break;
    case 'GBP':
    value = '£ ' + value;
    break
    default:
    };
    return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #0000ff;">' + value + '</span>';
    };
    in reply to: bind grid to gzipped xml bind grid to gzipped xml #11991

    grmbl
    Member

    Any info on this issue?

    I have large xml files to process and if I can send them gzipped it would dramaticaly increase speed I believe.

    in reply to: GET not allowed GET not allowed #11317

    grmbl
    Member

    have you tried adding this to your web.config:

    <configuration>
    <system.web>
    <webServices>
    <protocols>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
    </protocols>
    </webServices>
    </system.web>
    </configuration>
    in reply to: Remove ALL groups Remove ALL groups #11284

    grmbl
    Member

    Thanks a lot, Peter! That did the trick.

    PS: Maybe you could implement ‘cleargroups’ in the jqxGrid API?

    in reply to: Remove ALL groups Remove ALL groups #11282

    grmbl
    Member

    …seems like a bug, I’ve run it through dev console in Chrome and it seems that the groups object holds all
    the string values for the groups but the ‘removegroup’ is not performing on the last group?

    in reply to: Remove ALL groups Remove ALL groups #11280

    grmbl
    Member

    hmmm, strange things happening when performing the removegroup.
    by example I first add 3 groups and then run the following but there’s always 1 group remaining:

    var groups = $("#ordergrid").jqxGrid('groups');
    $.each(groups, function (i, value) {
    $("#ordergrid").jqxGrid('removegroup', value);
    });

    PS: yes I’ve changed from using the index to the string object in iteration because I had this problem even when using indices…

    in reply to: Remove ALL groups Remove ALL groups #11277

    grmbl
    Member

    nvrmind, found it! groups.length instead of groups.length – 1

    in reply to: Remove ALL groups Remove ALL groups #11276

    grmbl
    Member

    Hi Peter,

    I’m doing this and the groups are not being cleared:

    var groups = $("#ordergrid").jqxGrid('groups');
    for (i = 0; i < groups.length - 1; i++) {
    $("#ordergrid").jqxGrid('removegroupat', i);
    }

    Can you show me how to do it the right way?

    thx!


    grmbl
    Member

    ok, I understand Peter, that’s the whole point in jquery, lol.
    I’m new to js, jq… 🙂


    grmbl
    Member

    yes, but how can i bind img src=[itemdrawing] ? (see example above)


    grmbl
    Member

    Hi Peter,

    What I mean is how can I place an image on the jqxWindow with the path used from the datarow value.
    As far as I can see you can only bind data to input fields on the jqxWindow..?

    Kind regards,

    grmbl


    grmbl
    Member

    I have 2 other questions:

    1. If I use jqxWindow but it only needs to show when clicked on the buttons, why
    is the html code being shown? How can I go around this?

    2. Is there a way to default show ALL rows?

    Thanks


    grmbl
    Member

    Nevermind, I got it. 🙂

    AND I got it (partially) working using a buttoncell and jqxWindow!


    // imagecell value
    var imagecellrenderer = function (row, column, value) {
    return value;
    }

    // imagecell click
    var imagecellclick = function(row) {
    var offset = $(“#jqxgrid”).offset();
    $(“#popupWindow”).jqxWindow({ width: 300, height: 200, resizable: false, position: { x: parseInt(offset.left) + 60, y: parseInt(offset.top) + 60} });
    // get the clicked row’s data and initialize the input fields.
    var dataRecord = $(“#jqxgrid”).jqxGrid(‘getrowdata’, row);
    $(“#itemname”).val(dataRecord.ITPRDC);
    $(“#itemdesc”).val(dataRecord.ITDESC);
    // show the popup window.
    $(“#popupWindow”).jqxWindow(‘show’);
    }

    columns: [

    // { text: ‘Item’, dataField: ‘ITPRDC’, renderer: columnrenderer, width: ‘6%’ },
    { text: ‘Item’, datafield: ‘ITPRDC’, columntype: ‘button’, cellsrenderer: imagecellrenderer, width: ‘6%’, buttonclick: imagecellclick },

    ],

    Item

    Item:

    Description:

    BUT can I only use html elements of type “input” to bind the datarow data to?
    How would you suggest using the value for an img?

    Also, is it possible to set the offset of the popup to the buttoncell that was clicked?

    Thanks,

    grmbl ^^


    grmbl
    Member

    One last thing, how can I detect row selection changed and get rowdata of newly selected row?

    Greetings,

    grmbl


    grmbl
    Member

    OK Peter,

    Thanks for the info and looking forward to the implementation of jqxTooltip in jqxGrid!

    Greetings,

    grmbl

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