Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
SRP Error when AllowDeletions is enabled
I have a very simple edit table that had previously had the AllowDeletions property set to 0. The user wanted the facility to delete lines from the edit table so I simply set the property to 1. When I tested it, I get the srpcontrols4020 error window (which tells me pretty much nothing) but the item does delete. I'm pretty sure we're running the most recent version of the SRP Controls, so how do I get rid of the error window?
Comments
As to how to get rid of the error window, I am not sure yet. I don't think this is related to the AllowDeletions property because that property is used all the time in our applications. However, there is something you can do that will help isolate the problem. Instead of setting the AllowDeletions property to 1, just rem out the code that sets this property. It defaults to 1 so you do not need to set it. I want to see if accepting the default will avoid the problem. If it does, then it seems that setting the property introduces an unexpected error.
Dimension 1
RowsToRecords 1
BorderType XP
SelectionStyle @VM:S L=90:@FM:@FM:@FM:@FM:0:@FM:0
SuppressMouseMoveEvent 1
QuickTabOut 1
TitleList County/Parrish Name
NewRowCount 1
WorkspaceBkColor Window
ScrollBarsVisible 0:@FM:0
HeaderColors[All;All] @FM:%Gradient%
HeaderColumn[1] @FM:0
AllowInserts 0
*AllowDeletions 1
DataColumn[1] 200
and I am attaching a screen shot of the error window.
There is no denying you are encountering an error. The question is "what is causing it?". I think we will have to try and duplicate this on our end. It will probably be easiest to do this with your from. I believe I still have a current copy of your application. Can you tell me what form this is?
The good news is that I am convinced the AllowDeletions property is unrelated to the issue. I think you only discovered the bug after you updated this property and made a correlation. I was able to duplicate the bug out of the box. All I had to do was click in the SRP EditTable a couple of times and boom...error message. Through some trial-and-error with the other properties being set, I narrowed this down to the DataColumn[1] property. The setup record indicates a column width of 200. However, the control on the form is only 192 pixels wide. While that should not cause the error message, in your case I assume you really do not want a column to be wider than the control. So, you can quickly work around this by changing the 200 value to 192 or just set the column to be auto-sized width (thus, replace 200 with @FM:@FM:@FM:1).
The even better news is that we fixed this bug in the latest pre-release control (v4.0.4 RC1). You can download it from this link: SRPControls.ocx.
Even if you download the pre-release control, I still recommend updating your setting to make the column auto-sized width.