257
Views
7
Comments
Solved
[OutSystems Data Grid] Is it possible to disable editing for a specific row?
outsystems-data-grid
Reactive icon
Forge asset by OutSystems

 Is it possible to disable editing for a specific row of the grid,for example, disable editing for the row number 5 of the grid?

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Francisco,

To disable the Grid row editing - Explicitly set the isReadOnly property to True value for that specific row using JS node.

JS Snippet:

const grid = OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId)
grid.provider._rows[$parameters.RowIndex].isReadOnly = $parameters.IsReadOnly;

Demo Screen: DG_SetRowReadOnly

I hope this helps you!


Kind regards,

Benjith Sam

UserImage.jpg
Francisco Mendes

Thank you Benjith, that works 

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Francisco. Glad to help :)


Kind regards,

Benjith Sam

2023-08-03 10-53-19
João Valamatos

Hey @Benjith Sam 

firstly, congrats on this solution !

secondly... is it possible to apply this to a certain cell ? been trying to, but still not able...

thank you! 

UserImage.jpg
Vincent Perhirin

Hi João, 
I'm trying to do kind of the same as you on a datagrid. For my case, I need to be able to change this value to False. Did you find a way to perform this ? 

Regards 

2019-07-05 10-57-41
Nikhil Purohit

Hello Francisco,

There are other solutions in the community which worked in Traditional Web DataGrid for users to freeze the rows and making them read-only.

You can try them in reactive as well.

https://www.outsystems.com/forums/discussion/87411/read-only-rows-of-data-grid/

Let me know if it works for you!


Regards,

Nikhil

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Francisco,

To disable the Grid row editing - Explicitly set the isReadOnly property to True value for that specific row using JS node.

JS Snippet:

const grid = OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId)
grid.provider._rows[$parameters.RowIndex].isReadOnly = $parameters.IsReadOnly;

Demo Screen: DG_SetRowReadOnly

I hope this helps you!


Kind regards,

Benjith Sam

UserImage.jpg
Francisco Mendes

Thank you Benjith, that works 

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Francisco. Glad to help :)


Kind regards,

Benjith Sam

2023-08-03 10-53-19
João Valamatos

Hey @Benjith Sam 

firstly, congrats on this solution !

secondly... is it possible to apply this to a certain cell ? been trying to, but still not able...

thank you! 

UserImage.jpg
Vincent Perhirin

Hi João, 
I'm trying to do kind of the same as you on a datagrid. For my case, I need to be able to change this value to False. Did you find a way to perform this ? 

Regards 

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