Hi:
I am using Ultragrid 11.1.20111.2111.
By default, my grid's layout is set to allow Add/Update/Delete of the rows.
Depending upon the administrative rights of the user, I am programmtucally trying to change these settings:
If gcApplUser.Sys_Admin Or gcApplUser.BE_Admin Then
ugBED.DisplayLayout.Override.AllowAddNew = AllowAddNew.Yes
'ugBED.DisplayLayout.Override.AllowDelete = DefaultableBoolean.True
'ugBED.DisplayLayout.Override.AllowUpdate = DefaultableBoolean.True
Else
ugBED.DisplayLayout.Override.AllowAddNew = AllowAddNew.No
ugBED.DisplayLayout.Override.AllowDelete = DefaultableBoolean.False
End If
But when I sign up, I am not able to do any of these operations. I commented the entire IF .. End If and it works fine.
By the way, I am doing this after I load the layout file.
What am I doing wrong?
venki
Hi Venki,
There are three possibilities.
1) Something is setting the properties again after you set them. This could be because you are setting them in code, loading a layout, or loading a preset.
2) These properties are being set on the Override of the Band and the Band Override takes precedence over the DisplayLayout.Override.
3) You are setting CellActivation on the Column or Activation on the row and these are taking precedence over the AllowAddNew on the Override. For a complete list of all the ways editing can be disabled see this KB Article.
Mike:
1. I checked and this is the only place this is being set. Besides, I am reloading the layout file just before these statements.
2. These properties are set on the DisplayLayour.Override and not at the band level.
3. No. Please refer to point 1.
Also, the link for the KB Article did not work for me. Can you check and send the corrected kink to me?
Thanks.
Venki