Perspective table cell - defer update functionality

Hi Guys,

If a user enters something in the cell, it isn't actually edited until they press Enter on the keyboard. I would like the edited cell without pressing the Enter. Does anyone know how to do "defer updates" is disabled?

Thanks,
Priyanka Khandge

I needed that functionality once, and if I remember correctly the only way I found was to embed a text field instead of using the cell directly.

Maybe there's a better way, but you could try this.

1 Like

Here I have added the view in the table. Without pressing the Enter key value-added successfully.
But I am facing one issue here. When I have updated a single row at a time and then successfully updated but when I am trying multiple rows at a time then update the same value in all rows (all rows means clicked update button rows).

Here view value passed using the message handler.

Can't do much without seeing what you did.

This is the button template.

image

In the button template added the message handlers in the root like below

The below script was added to the dropdown view for the selected value to send the message to the message handler (button view)

I have added a view (button template) in the particular table column like below

image

Also added a dropdown view like below.

Here when I updated a single row then updated successfully but when I tried to update multiple rows at a time then updated the rows but the same value was added in the database dropdown column.

Example:
For the first row dropdown value select Press second dropdown value select Weld Then I clicked on both update buttons then updated the value in the database in both rows Weld because here last Message Handler passed the value Weld. Any idea how to fix this?

image

You'd need to use some row id to filter incoming messages.

But I believe you're going the wrong way about this.
Don't send a message from the drop down to update value in the button's view, instead send a message from the button to request an update. You'll also need to send some form of identification through the payload so you know what to update.
This way you can put just ONE message handler on the table or whatever seems convenient to you, where you'll get the data from the table based on the identification sent and perform any operation you want.

I'll suggest yet another way: Remove the buttons from the table and add just ON button outside of the table, that will update everything that changed.
When I do this, I don't bind the table's data directly to the source, instead I use a custom property to fetch the data, then bind the table to this. Then when I want to update, I can compare the data from the table to the original data and update only what has changed.

4 Likes