Comments (2)
Hello,
If I understood you correctly, what you want to do is send a completely new set of data to the datatable?
Did you check the return value of jq1_11_1('#tblResults').datatable('select', 1) ?
When calling the datatable contrusctor, you should use « data » not « insert » to reset the current set of data - If you don't, the plugin uses the current values in the HTML table, which, in your case, are the old entries.
from datatable.
Thank you for responding so soon. I did not want to search for another tool as this project I am working on is coming to a close. Your paging tool is sweet.
Your suggestion is exactly what I was going for. This is what I did per your recommendation.
Code:
try {
if(jq1_11_1('#tblResults').datatable('select', 1) == null)
{
jq1_11_1('#tblResults').datatable('destroy');
}
//data: tableData,
jq1_11_1('#tblResults').datatable({
data: tableData,
pageSize: 50,
sort: [true, true, true, true, true, true, true, true, true, true, false, true, true, false, false, true],
filters: ['select', true, 'select', 'select', 'select', true, 'select', 'select', 'select', true, false, true, true, false, false, true],
filterText: 'Type to filter... '
}) ;
}
catch(err) {
jq1_11_1('#tblResults').datatable({
data: tableData,
pageSize: 50,
sort: [true, true, true, true, true, true, true, true, true, true, false, true, true, false, false, true],
filters: ['select', true, 'select', 'select', 'select', true, 'select', 'select', 'select', true, false, true, true, false, false, true],
filterText: 'Type to filter... '
}) ;
}
If something exists within the select statement I then use the "destroy" command to make it seem like the results keeps "refreshing". It works wonderfully!
I am closing this issue as its fixed! Thanks again! Sweet tool.
Edit: I just realized something. I make it seem like this tool was actually broken, but I just want to clarify I didn't know what commands to use to get me what I needed. The paging tool works just fine. But if I may make a suggestion that the documentation could be updated a bit to say that destroy works well with data and not insert. That's all. Thanks again!
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
- Get number of a table row. HOT 6
- 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.