Hi,
I have some thing like this,
Where the user select a value from the drop down widgets and the those values will be added as a new row in data grid on "Save" button click.
I want two properties here-
1) Want to add delete column on right side of the RestrictionState column.
2) Dont want to add duplicates in the grid.
How do I can achieve this.?
The save on click button is -
Hello Keshav,
For Delete button you can add new column to your grid then add button or link to this column and make its text value "Delete".
In case you will delete from grid only and not from database you will implement delete logic inside onclick action of button by removing element from list using ListRemove action and position of element into the list.
In case you will delete it from database so implement a server action that will delete row from database entity using row Id then refresh your DataAction.
For check duplication same you can check if same element exists into list before append new element using ListAny action
Can you please share the demo file.? I am not able to implement this.
Kindly find attached sample.
Please note that In my demo I am adding new employees to displayed grid first without adding them to database and finally I am click save to database to add new employees to database.
Delete button check if the employee has Id or not (Newly created and not saved to database yet or old record which already saved to database) then if its new record just remove it from lists otherwise deleting it from database.
I am not able to publish your app, and I am using grids not tables, the "check for duplicates" work fine, but how do I can add delete column in the grid.
Kindly check attached oml which has a new screen using grid
This doesn't work for me, as I am not using the DB entity to store data and In my outsystem I have not used columns.
HOw do I can add delete column here.?