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,
Okay, I have attached a sample using CheckBoxes to enable/disable editing in the grid.
Mike:
Would it be possible for you to send me a sample project that programmatically modifies the allowaddnew, allowdelete and allowupdate properties?
Nice try; no, the dataset is updateable.
Oh... actually, there is one more possibility that just occurred to me - if your data source is read-only, then nothing you do in the grid will allow you to edit it.
Here's the link:
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?
Those are the only reasons I can come up with why this would not work. So if that doesn't help, I'm out of ideas. If you can post a small sample project demonstrating the issue, I could debug it and tell you what's happening, though.