Comments (6)
id
is the index of the row in the unfiltered dataset, so you could simply use it. Or am I misunderstanding what you want?
from datatable.
I want to do this:
Enumerate all rows automatically, including when filter, add and delete data, is it possible?
from datatable.
What do you want to see when you have filtered data? Something like this?
#| Field1 Field2
1|
3|
4|
6|
If so, you can simply use the id
(maybe id + 1
).
from datatable.
nop, let's suppose to I have 6 rows in my datatable in first time, so when I filtered data (for example this filter get me only 3 rows) I want to see :
**
#| Field1 Field2
1|
2|
3|
**
I don't want this:
**
#| Field1 Field2
1|
4|
6|
**
Another example: if I have 6 rows in first time and I delete the row 5, I want:
**
#| Field1 Field2
1|
2|
3|
4|
5|
**
I don't want:
**
#| Field1 Field2
1|
2|
3|
4|
6|
**
from datatable.
There is no built-in way, but the row are appended to the tbody
element sequentially, so you could simply count the number of tr
in the tbody
, e.g. (not tested):
lineFormat: function (id, data) {
var pageRowNum = $(this).find('tbody tr').length;
var rowNum = (this.getCurrentPage() - 1) * this.options.pageSize + pageRowNum + 1;
// Whatever you want...
}
from datatable.
it works !!, thanks so much.
from datatable.
Related Issues (20)
- Inject data to table row HOT 4
- Nullpointer Exception table with filter and no data
- Not working on my project :( HOT 6
- CSS not work HOT 4
- Extract filtered records HOT 11
- Filter outside the table HOT 2
- No idea how to make filter outside table HOT 1
- Update table data HOT 19
- Process Ajax Data Before Displaying on Table! HOT 3
- Using Filter/Sort with hidden child rows HOT 3
- Question: How to search/filter multiple columns with one search field HOT 2
- Was cleared all attributes from td. HOT 1
- Click in a row event HOT 3
- Filter by date mm/dd/yyyy HOT 1
- Ajax Doesn't Work HOT 4
- filter is not function after apply addRows HOT 2
- Table reload method HOT 2
- how can i implement for rowspan ? HOT 3
- how to set default page ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatable.