StrataFrame Forum

Combobox: SuggestAppend and IgnoreManageReadOnlyState

http://forum.strataframe.net/Topic20588.aspx

By Aaron Young - 11/6/2008

Hi,

Not for the first time I am a little confused Smile

I have a combobox with autocomplete settings set to SuggestAppend. However, the "append" part of the functionality doesn't work unless IgnoreManageReadOnlyState is set to true. However, setting this property to true obviously means the combobox is not enabled/disabled based on the BO editingstate. If IgnoreManageReadOnlyState is set to false (the default state and in my case the desired state) then the append functionality stops working.

It would be great if it was possible to have the append functionality without needing IgnoreManageReadOnlyState to true.

Thanks

Aaron

By Trent L. Taylor - 11/6/2008

Aaron, though I generally do not use the SuggestAppend, the two should not be related.  The IgnoreReadonlyManageState is used, through binding, to simply enable or disable the field based on the state of the BO.  Now in all of our applications, we never allow the fields to be disabled unless there is a security restrictions (like the StrataFlix sample).  So if this is causing an issue, more than likely there is an order of events that is causing the issue.  I will add this to a list to look at, or you could create a quick sample, but in either case, this sounds to be more related to the combo versus the binding states.  Also, just FYI, this is an inherited feature of the standard .NET combo that has not been enhanced or modified by SF (in regards to the SuggestAppend).
By Aaron Young - 11/6/2008

By default, our forms are in "Idle" state and the controls are disabled to prevent users from accidently changing data. The Edit button is then used to enable the controls for data entry. This is why I like to leave IgnoreReadOnlyManageState to the default of false.

I was struggling as I couldn't get the combobox append functionality to work. After searching through the forums I found this thread:-

http://forum.strataframe.net/Topic18580-7-1.aspx

I downloaded Dustin's AutoCompleteTest.zip and it was only then I noticed he had IgnoreReadOnlyManageState to true. I tried it in my application and the append functionality suddenly starting working. When I set it to false append stops working.

On paper it looks like IgnoreReadOnlyManageState should have nothing to do with SuggestAppend but something in this setting is causing it to work.

The "suggest" part of the feature always works. It is the "append" part that is affected. Maybe the "append" feature is turned off when the control is disabled and it is not turned on again when the control is enabled?

By Aaron Young - 11/6/2008

Trent, attached is a sample project linked to your sample database.

The form is a standard maintenance form with a products dropdown from the order item table. The products dropdown has SuggestAppend as autocomplete.

If you run the form without modification, IgnoreManageReadOnlyState is false. Click the Edit button and then type HL into the products combination box. Note that the "append" functionality doesn't work. Now close the form and change the combobox's IgnoreManageReadOnlyState to true. Run again and repeat the process. This time the append functionality works.

I suspect the append functionality is turned off when the control is initially disabled and is not turned back on again when the control is enabled?

Hope this helps.

By Aaron Young - 11/6/2008

Just giving this a bump just in case my double posting side by side may have caused the sample application posting to be missed.

Aaron

By Dustin Taylor - 11/7/2008

Howdy Aaron Smile,

I downloaded and tested out your sample. Unfortunately it looks like we are running into the same thing I did with Doug in the post you referenced. The append functionality is working for me regardless of the manage read only state.

I know it might be a long shot, but what version of the .NET framework and VS IDE are you running with?

Thanks!

By Aaron Young - 11/7/2008

Hi Dustin,

Wow - not what I was expecting at all.

I have Visual Studio Team System 2008. I am building against .NET 2.0 although I have .NET 3.5 SP1 installed too.

Aaron

By Aaron Young - 11/7/2008

Just tried building to .NET 3.5 SP1 and the problem remains. My sample project ZIP file should contain the original EXE in the Bin folder. It fails on my system but does it work on yours if you run the EXE without rebuilding it in your Visual Studio?
By Trent L. Taylor - 11/7/2008

We will try your EXE alone in a bit, but we are running VS2008 SP1 Team System as well.  So I don't think that would be the issue...these types of issues are always frustrating....two different results with the same source is always irritating.