Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resetting counter column #47

Open
samdamnu opened this issue Jun 24, 2014 · 0 comments
Open

Resetting counter column #47

samdamnu opened this issue Jun 24, 2014 · 0 comments

Comments

@samdamnu
Copy link

I need to have the first column of my tables as a counter column (row numbers) that does not get affected by sorting (like in this datatables API example). But inserting that code snippet in the into the fnDrawCallback function breaks the responsive behavior. The columns are hidden alright, but are not expandable anymore.

        fnDrawCallback : function (oSettings) {
            responsiveHelper.respond();


            /* Need to redo the counters if filtered or sorted */
            if ( oSettings.bSorted || oSettings.bFiltered )
            {
                for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
                {
                    $('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
                }
            }

        }   

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant