SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

RowDetailView handling filter row counts

Open SatanEnglish opened this issue 6 years ago • 1 comments

@6pac @ghiscoding

New issue working around at the moment.

Need to get the length of the showed rows. Trying to do this without changing underlining core stuff again...

Inside of slick.dataview.js I can see that the getLength method returns the rows.length. These are only the visable rows.

I'm wanting to get to that rows object but it turns out it's not the same one that is exposed.

e.g. _dataView().rows gives me all the rows even the hidden ones;

Is there a way to get to these objects?

SatanEnglish avatar Jun 20 '18 04:06 SatanEnglish

        onRowCountChanged = function () {
            var rows = 0;
            for (var i = 0, l = grid().getDataLength(); i < l; i++) {
                // Check for expanded row data
                if (!grid().getDataItem(i)._parent) { rows++; }
            }
            window.setRowCount(rows);
        };

This works for now but it's a little nasty

SatanEnglish avatar Jun 20 '18 05:06 SatanEnglish

So unless I am mistaking, we already have the getExpandedRows() method that returns the expanded rows. If that is not what you were looking for then please provide more details but for now I'll go ahead and close the issue.

Note that a lot changed since this issue was opened, our whole code structure changed (we removed jQuery/jQueryUI and we migrated to TypeScript).

ghiscoding avatar Sep 29 '23 03:09 ghiscoding