Create new item doesn't refresh data and issue with HTML encoding

Create new item doesn't refresh data and issue with HTML encoding

sudderssudders Posts: 8Questions: 2Answers: 0
edited December 2015 in Free community support

Hi,

I started using the datatables editor two weeks ago (purchased by a client) and would like to say what a great piece of software this is.

I have encountered two issues recently and wondered if it was a known issue or something I was doing wrong:

  1. When creating a new item, the datatable doesn't refresh data I have to press F5 to refresh the screen to see my newly added record.

  2. HTML encoding: I seem to have a problem with encoding. the datatable doesn't accept <br> at all. It does accept single quotes ' however when I later edit the item (either inline or pressing edit) the encoded version displays &#39; in the textbox which causes an error when I attempt to update it.

Any help will be greatly appreciated.

Thank you,

Nathan

Answers

  • matt_rumsey1212matt_rumsey1212 Posts: 51Questions: 8Answers: 0
    edited December 2015

    For the first problem if you are using javascript and ajax, try:

    table.ajax.reload().draw();
    
  • sudderssudders Posts: 8Questions: 2Answers: 0

    Hi matt_rumsey1212, thanks for your prompt response your line of code worked fine. I now know how to refresh the data of the table which will come useful when I need to perform custom filtering. based on DDL and checkboxes.
    I have a follow up question (sorry)...

    Where should this line of code go to refresh the data after create? Should there be a function callback or something?

    Many thanks,

    Nathan

  • sudderssudders Posts: 8Questions: 2Answers: 0

    Anyone else have an idea on this or would it be better if I asked my client who pays for this to ask the question?

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    Hi,

    When creating a new item, the datatable doesn't refresh data I have to press F5 to refresh the screen to see my newly added record.

    This can happen if the server doesn't respond with the JSON that Editor requires in order to display the new row. What is the JSON that your server is responding with?

    The other possibility is that there is a Javascript error occurring on the page. Does the console in your browser show anything?

    HTML encoding

    The quote issue is going to be resolved in Editor 1.5.4 (which I expect to be able to release tomorrow all being well). I presume from this that you are using the Editor .NET libraries?

    Way you say it doesn't accept <br> at all - do you get any errors, or what happens there? <br> should be perfectly acceptable.

    Allan

This discussion has been closed.