Related Items control - howto set grid as read-only
-
- Posts: 11
- Joined: Wed Jun 07, 2017
Hello Dmitry,
I’m using the Related Items control in the edit mode and everything is working nicely.
I’m only facing the problem to set the Grid into Read-only mode after the process is completed (tracked by status value).
I'm wondering is there a way to set the whole grid into ready-only mode (which also includes that deletion should not be possible) without having to create a new form group?
For example could I set the Forms Designer Client > Related Item control > Editable property to "false" by javascript code?
I’m using the Related Items control in the edit mode and everything is working nicely.
I’m only facing the problem to set the Grid into Read-only mode after the process is completed (tracked by status value).
I'm wondering is there a way to set the whole grid into ready-only mode (which also includes that deletion should not be possible) without having to create a new form group?
For example could I set the Forms Designer Client > Related Item control > Editable property to "false" by javascript code?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
The following code disables all columns in the grid:
But users can still delete rows and use a context menu. Our support team can implement a script that disables the context menu and prevents deleting rows. It will take two support hours:
https://spform.com/buy/support-maintenance
The following code disables all columns in the grid:
Code: Select all
var ctx = fd.relatedItems(0).data('ctx');
ctx.ListSchema.Field.forEach(function(f) {
f.AllowGridEditing = "FALSE"
});
EnsureScriptParams('inplview', 'InitGridFromView', ctx.view);
https://spform.com/buy/support-maintenance
-
- Posts: 11
- Joined: Wed Jun 07, 2017
Hello Dmitry,
Thanks a lot, this works perfectly!
Thanks a lot, this works perfectly!
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests