Inline Editing within grids.

I am trying to implement inline editing within a grid. My expected outcome is that when a user clicks on the Edit Icon at the end of a particular row, the values in that particular row should become editable while all the other rows remain the way they were. Once the user is done editing, the user clicks on the Save button at the end of a particular row and the new edited values of that row get saved into the database.   I am new to Mendix and thus, do not know much about this.
3 answers


Hi Chirag,

I think you're looking for this, as I have attached my screenshot, you can use a button for edit and use the icon as I have given on the image, and to on click call show page, and for page, you need to create new page and choose layout as popup call the same data entity from your data-grid or list view that you want to edit the page.

Hope that helps you.


You can do it with a listview, and probably with a datagrid 2.

What you will have to do is to put an edit button at the end of the row, also in the row, you will display two things, one text (non editable) and one text box (editable). You will have to hide the text and display the text box when the user click on the edit button. To do that you will have to add a boolean attribute in the entity used by your datagrid2 or listview, you can call it “editable” for example. When the user click on the edit button you put that attribute to true (and you display/hide the textbox/text according to that value using the visibility option of the textbox / text )



Create an entity “View” and add 1 to 1 association with the main entity. Add a boolean attribute in the “View” entity. 
In the page, use data grid-2 and create one custom content column at the end which contains the edit and save buttons. 

Use microflow as a data source for the data grid-2 and create “View” entity object for each main entity object and return the list of the View entity to the data grid-2. 
Now, each main object is linked to a View entity object. Also, on click of edit button call a microflow and modify the boolean attribute of the View object for that main entity object and save the object.

And on click of save button again modify the boolean attribute to value false and save the main and view objects.
Also, in text box widget select conditionally editable and select the condition on based of attribute value and select that boolean attribute of the View entity.