简体   繁体   中英

DataTables ajax - define number of rows returned

I'm using the DataTables plugin with bProcessing and bServerSide . Sometimes I will return an empty record for a TD and I don't want it to count this.

The count, ie, Showing 1-4 of 10 Records. I would want it to show 1-3 instead of 1-4, but this value is calculated based on the number of TD rows returned. I can't seem to find a way to pass this value with the ajax return, as I can with iDisplayStart and iDisplayLength.

Any ideas as if there's a work around?

Thanks!

not sure if will solve your problem , but have you checked the iTotalDisplayRecords ?

Server-side processing

btw , why exactly cant you return 3 rows of data instead of 3 rows of data + empty line?

I mean . You should control the data you sending back from the server to the client...

Maybe if you will describe the way you work you wont be needed to manipulate any properties like iTotalDisplayRecords

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM