61
Views
7
Comments
[OutSystems Data Grid] How can I make specific rows column allowedit to false based on another column value.
OutSystems Data Grid
Forge asset by OutSystems
Application Type
Reactive

I would like to know if there is a way of changing the Columns configuration options like: IsMandatory, AllowEdit, Min&Max Value; for each cell based on other cell's value of specific rows column

2021-06-03 11-03-21
Anubhav Rai

Hi @Hidayat Ali M Mujawar ,
You can use "getcelldata" to check the value of the specific cells and after that divert the flow to implement your other validations(IsMandatory, Min&Max, etc), for AllowEdit(Protect) please check  Link
For this, you will need to trigger the action on cell value change action and implement the above logic in that.

Please let me know if you have more queries.


Regards,

2022-03-14 16-37-00
Hidayat Ali M Mujawar

Hi Anubhav Rai 

Thank you so much for a really quick response I am working with Data grid and the question was based on data grid 

let me elaborate my question

I have 2 columns IsRegisned (as check box), ResignedDate (Date)

ResignedDate by default non editable or non selectable date it should only allow user to select date if IsResigned is checked 

2021-06-03 11-03-21
Anubhav Rai

On checkbox change call this action to get the value of the checkbox you can follow the below steps:-

Or simply you can check if the checkbox is selected or not by just checking the input parameter(NewValue) of the above action.

Once you get the value you can implement your further validations, if you want to make the cell editable then follow the post that I have attached in the above comment, you can use the input parameter(RowNumber) to pass in the editable/Protect logic.

You can also check this post for editable/non-editable cell logic Link

2022-03-14 16-37-00
Hidayat Ali M Mujawar

Hi @Anubhav Rai 


I think i was not able to make you understand exact problem which i am facing 


https://www.outsystems.com/forums/discussion/76167/outsystems-data-grid-change-cell-configurations-based-on-other-cell-value/


The above link may help you to understand the exact issue i am facing

2021-06-03 11-03-21
Anubhav Rai

Hi @Hidayat Ali M Mujawar ,
Now I understand your issue, working on it, and will provide you the solution in some time.
I mixed up with data grid and Excel functionality.

2022-03-14 16-37-00
Hidayat Ali M Mujawar

Hi @Anubhav Rai  

Thank you so much waiting for your response

2021-06-03 11-03-21
Anubhav Rai

Hi @Hidayat Ali M Mujawar ,
I tried a few things to achieve your output but unfortunately, I didn't find any direct solution.
But anyhow I am able to achieve the solution hope this helps you.
You can update my code as per your requirements.

When you click the checkbox you will see the default date as the current date, you can click on that and will be able to update the date in the popup.
For updating the date user will need to select the checkbox.

Please let me know if you have more queries.



Regards,

DataGrid_DateDisableDemo.oap
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.