Multirow editing allows read-only data to be deleted

Multirow editing allows read-only data to be deleted

mikelucksmikelucks Posts: 14Questions: 2Answers: 0

When editing multiple rows, data in read-only columns may be deleted. Here's an example that creates a table containing one read-only column.

http://live.datatables.net/mehequzu/4

1) Select both rows
2) Click the Edit button
3) Click in the textarea containing the message about Multiple Values
4) Click Update

This should not be permitted. Is there a workaround?

Replies

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Thanks for flagging this up. Currently no - there isn't a way of handling this correctly. Let me have a think about it and get back to you.

    Regards,
    Allan

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0

    Alan, have you thought of a solution or workaround for this problem?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Sorry - I haven't had a chance to check into this in depth yet. I took a little look at the start of the week, but it wasn't immediately clear how this should be handled. I'll have a bit more of a think about it.

    Allan

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0

    Thanks, Allan!

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Sorry for the delay in replying to this! I've just committed a fix for this which will be included in Editor 1.6 which will drop next week.

    Regards,
    Allan

  • mikelucksmikelucks Posts: 14Questions: 2Answers: 0

    Thanks Allan, but I'm still seeing the error in Editor 1.6.1.

  • aswinsayeeaswinsayee Posts: 1Questions: 0Answers: 0

    Hi Allan, Is there any update on this item. It would be great if you could help on this.

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Apologies - there is a fix in for this basic idea, but it doesn't work for the readonly field type yet (I'll fix that for 1.6.5 which I'm going to release today or tomorrow).

    In the mean time, use disable() to disable a field and that will work: editor.disable('name'); .

    Allan

This discussion has been closed.