Hi dustinaleksiuk,
Kindly checkout the community link below. This post has a similar query as yours.
The list of helpful links related to row validation is found there.
https://community.k2.com/t5/K2-Five/To-validate-each-row-in-K2-list-view/m-p/112596#M3944
Should you feel that this post is of use and or an accurate solution to the raised question, I kindly encourage you to mark it as such
using the 'Mark as Solution', 'Kudo' andor ‘Me Too’ options.
Cheers,
Kate
K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.
I appreciate that reply and I had found that post previously. I'm not clear on what they're recommending. The recommendation is to use the "Add new row" event, but that event fires when when a new row is added. I want to validate fields on the row that the user is currently editing before they add a new row.
The other 2 events I mentioned in my post work for this, but they seem to be broken. They stop firing after a while even after removing them and re-adding them. They fired for me for a bit and then stopped.
I have another view where my approach works but in this current view they don't.
I know exactly where you are coming from.
I will follow this post to see if there is a resolution.
Currently, as a workaround, I've ended up having a non-editable list view.
1. The user enters the data in Form controls below (and separate from) the view and click a submit button
2. If validation passes it then saves
3. List view is refreshed
4. Form Controls are cleared
Not the ideal way, but at least this way you can do validation on the controls. It just means the User has to enter one row at a time and click a submit button everytime.
I like that approach and wish we would have gone that way. How do you handle edits?
We have other screens where we enable an edit button that allows the user to edit the selected row. It opens a modal dialog for that row and we can validate that modal. We can use it for both new rows and editing existing rows.
Thanks,
Dustin
With the Lists we have so far, there is no need to validate what is edited.
However, I am working on a new project and may run into this problem. I like your idea of having a modal subform/subview, however I not sure if this will work well on a mobile device, I will have to check.