Data rows not redrawn when calling fnDraw()
Data rows not redrawn when calling fnDraw()
ebbsyMK
Posts: 3Questions: 0Answers: 0
Hi,
Hoping someone can help as its driving me nuts!
I have used datatables quite a lot over the last few months and thought id had everything sorted but this latest page and the requirements just wont seem to work.
http://debug.datatables.net/axiwoq
As you'll see i have two tables on the page, the one that isnt working is #ProductList.
The table populates via ajax, this works ok, i can filter using the predefined filter box, again working fine. To enable some additional functionality i have got a drop down list with the choice of SSTId. This is passing back to the controller fine and I can use that to filter the data returned as json. This also works (confirmed ok with JsonLint and checking with Fiddler).
So what should happen is that the data returned after choosing that drop down and it calling fnDraw() is that the screen updates to show the new data, but thats the problem, it doesnt. The really weird thing though is that the debug for that table shows the rows with the right data but the actual page never updates (data rows, pagination, record numbers etc).
I'm guessing that something is failing but chrome doesnt show any js errors, nor does FF and it doesnt hit an ajax error (i had extra line for capturing the ajax error, that wasnt hit).
Any ideas? please! :) (cant post link to page, internal only and as its ajax loaded i cant use live either)
Tim
Hoping someone can help as its driving me nuts!
I have used datatables quite a lot over the last few months and thought id had everything sorted but this latest page and the requirements just wont seem to work.
http://debug.datatables.net/axiwoq
As you'll see i have two tables on the page, the one that isnt working is #ProductList.
The table populates via ajax, this works ok, i can filter using the predefined filter box, again working fine. To enable some additional functionality i have got a drop down list with the choice of SSTId. This is passing back to the controller fine and I can use that to filter the data returned as json. This also works (confirmed ok with JsonLint and checking with Fiddler).
So what should happen is that the data returned after choosing that drop down and it calling fnDraw() is that the screen updates to show the new data, but thats the problem, it doesnt. The really weird thing though is that the debug for that table shows the rows with the right data but the actual page never updates (data rows, pagination, record numbers etc).
I'm guessing that something is failing but chrome doesnt show any js errors, nor does FF and it doesnt hit an ajax error (i had extra line for capturing the ajax error, that wasnt hit).
Any ideas? please! :) (cant post link to page, internal only and as its ajax loaded i cant use live either)
Tim
This discussion has been closed.
Replies
I'm afraid I'm not sure why this isn't working. A call to fnDraw with server-side processing should always refresh from the server. Are you seeing the Ajax request being made to the server?
Allan
I'm pretty sure that the whole ajax call is working and returning fine (hence the data shown in the rows section of the debugger) its just the redraw itself that doesnt look to be occurring.
I can post a screenshot of the page with the datatable displayed which would illustrate the difference in data shown on screen and what the debugger is reporting but im not sure that would help to solve the problem.
Happy to include any code/html if that would help?
Great product though by the way, standard implementation, ajax refresh its all been so useful so really wanted to say thanks for that
Tim
Allan
So i can only assume it lost which table it should have been referencing or something, probably some sort of silent javascript failure although everything i looked at seemed fine.
Cheers though
More on that: http://82.113.152.82/forums/discussion/17733/fndraw-does-ajax-call-but-no-refresh-on-page#Item_1