72
Views
6
Comments
Solved
[OutSystems Data Grid] Is it possible to disable editing for a specific row?
data-grid-reactive
Reactive icon
Forge component by Gonçalo Martins

 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?

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

Thank you Benjith, that works 

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


Kind regards,

Benjith Sam

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! 

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

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

Thank you Benjith, that works 

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


Kind regards,

Benjith Sam

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! 

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