How to restrict the editable property of editable table in case of validations.

I am using an editable table and in that I have two Input fields, there are some server side validations applied to these fields. When we click on save button of editable table, all the validations are performed and the error message is displayed accordingly but the problem is we will loose focus from that field. The row becomes non editable and we have to click on that row again in order to focus the input element.

Is there something by which this issue can be resolved?

Are you using any forge component Dhanashri? and which one?

Hello Dhanashri Jaiswal,

Have you used the Ajax Submit method on Save button?

Hi Swatantra/ Suhas,

i am not using any forge component, it is the normal widget available in outsystems and yes I have used Ajax submit method on save button.

are you refreshed whole table or Current Row only?

Hi Suhas,

I am refreshing only the invalid input field.

Hello Dhanashri Jaiswal,

can you please share the OML?

you can use jquery to focus on the Invalid input field. I hope this will solve the issue. 

The best way if you send us the OML file then we can solve the issues for the same.


Thank you,

Sudip


Hi Dhanashri,


you can use  $("input").focus(); for which input you want foucs.because when refresh invalid inputs then focus loss after refresh you can add jquery.


Thanks

Rahul Sahu

Hi Rahul,

I have tried the Jquery method also but it was not working. Here is the OML file which have similar problem which i am facing in my current project.

Hi Dhanashri,


The issue is completely right, there are some design scenarios validation, as you can verify at the time of creating a new row just after saving as asynchronously the previous one, and there was no easy way to make two rows editable at the same time due to restrict the overlap action.


my suggestion would be to send a error or Info message from your "OnTableRowSave" event when there are any true condition for validate entries.


Thanks