jQWidgets Forums

Forum Replies Created

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

  • bach
    Participant

    Ah interesting. While those cells not being visible is an unlikely scenario in my app, it is still a possibility that I must account for. Unfortunately the beforeLoadComplete does not work for me in this instance, but I think I can use it elsewhere.
    Thanks for the tip!


    bach
    Participant

    This is a very old topic, but I’m going to bump it because it’s always the first result of a google search when I’m struggling with this topic. I’ve been banging my head against this problem for a while now. For the past year my app has been using setcellvalue commands in place of cellsrenderer calculations because I couldn’t access the computed value of each row for a final aggregate sum. I (and my end users) finally got sick of the sluggish performance of the page and this was one of the root causes of the slowdown.
    I finally found a good, simple solution, and in case it can help out anyone else here it is:

    adding a class to the cellsrenderer function allows you to access the computed values even though they’re just in the hdml and not actually saved in the grid. My cellsrenderer adds a class called “totalme” in it’s return, something like this:
    return "<div class='jqx-right-align totalme'>" + total + "</div>";

    in an entirely separate grid where I want to show the sum of all of these computed cells, I use:

            var rowtotals = $(".totalme").map(function() {
                return $(this).text();
            }).get();
    

    to create an array of all the computed values. After that, you can loop through the values and do whatever with them.


    bach
    Participant

    Very cool, thanks!


    bach
    Participant

    Apologies, I think my initial post was unclear. I’m not using the checkbox as a selection mode. I’m actually using it to trigger some css changes, but that’s not too important.
    I’ve put together a fiddle to show the issue. In the process of putting this together, I found the actual cause of my troubles and it appears to be a bug.

    http://jsfiddle.net/z9br38f0/43/

    Try changing the text in one of the Last Name column cells. While that cell still has focus, click on one of the other cells. Focus is moved to the new cell, and the text in the first cell is accepted. Now try the same thing, but instead of clicking on another text cell just click the checkbox in that row. Now focus is not moved from the first cell but the text changes are lost.

    Next, comment out line 109, (autoheight: true) or change it to false. Try the same thing with the checkbox and this time you’ll see that, although focus is not shifted from the cell being edited, the text changes are not lost. This seems to be the correct interaction, and what I’d like to achieve.

    Therefore, it seems that there is a bug with autoheight which, unfortunately, I need to use on my grids.

    Anything that can be done to fix this?
    Let me know if the example fiddle is not clear enough.

    Thank you


    bach
    Participant

    pretty good, but it messes up when you drop down one that’s already highlighted. I think it has to do with the additional row being created for the details.
    I think I’ll have better luck putting my signaling into one of the grids actual cells instead of the collapse arrow. Thanks for your help!


    bach
    Participant

    here’s a fiddle that’s close to my setup

    http://jsfiddle.net/z9br38f0/39/


    bach
    Participant

    Actually, that almost works, but not quite for me.
    I have multiple grids on my page and multiple pinned columns in each of those, so anything after the first row of the first grid is incorrect.

    I’m using an editable nested grid as my row details.
    Is there a way to do something similar using a cellendedit function on that detail grid?


    bach
    Participant

    That’s fantastic, and very easy. Thank you!

    in reply to: cell with date range cell with date range #86493

    bach
    Participant

    Oh that’s perfect! Thanks Christopher

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