Skip to main content

I am new to K2 programming so forgive me if I ask too many questions. I have an editable list that users can add one to several rows of informatio. I want users to add an item to an editable list but make the item save upon the row losing focus. I don't want the to click Add or add another row. This is because I want to incriment a list count if they add just one item.

Hello jaswerl,


 


I went through the editable list view rules and I may have found a way for you to acheive this functionality. In my example, I have added a 'Name' column to my editable list view.


 



 


We need to add a "When the View executes a method" rule to the editable list view. We will configure this rule to be when the edit text box is 'Changed'. 


 


Then we add "a control contains a value" condition to the rule and configure this to be the Text Box for our column.


 


Last we will add two actions.  The first:


"Execute a method on the View" - here we will use the 'Save' method and configure it to save from the 'Add/Edit Row' category. 



The second action is the same, "Execute a method on the view". Here we will use the "List refresh" method. There should not be anything else to configure. 


 



 


This configuration will allow the user to edit the row and then when they move away from the column textbox (the one you configured the rules for), it will save the list and refresh the list to show save. I have attached a screengrab of my list following these rules.


 


https://www.screencast.com/t/tp6LvTVAi


 


I hope this helps, please feel free to ask as many questions as you wish :)


 


Thanks,


K2Z


 


Good day,

You can try to configure the rules that when you press enter, the view automatically saves the data.

 

This should be under the advanced option for the rules event action.

 

Given you feel that the response is of use or a solution to the issue posted, please mark it as “Mark as solution”, “Kudo” or both options.

 

K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by the forum member.

Kind regards

Dumisani

 

 


Thanks K2Z This is an elegant solution.


Reply