Error when adding new row, bound combobox


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Any idea what this might be? I have a combobox populated via BO bound to a field in my "master" BO. I can view, navigate, edit, just not add......



Thanks.





IndexOutOfRangeException

There is no row at position -1.



Source : System.Data



Stack Trace:

at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)

at System.Data.RBTree`1.get_Item(Int32 index)

at System.Data.DataRowCollection.get_Item(Int32 index)

at MicroFour.StrataFrame.UI.Windows.Forms.ComboBox.DrawDropDownClosed(DrawItemEventArgs e)

at MicroFour.StrataFrame.UI.Windows.Forms.ComboBox.DrawDropDownItem(DrawItemEventArgs e)

at MicroFour.StrataFrame.UI.Windows.Forms.ComboBox.ComboBox_DrawItem(Object sender, DrawItemEventArgs e)

at System.Windows.Forms.ComboBox.OnDrawItem(DrawItemEventArgs e)

at System.Windows.Forms.ComboBox.WmReflectDrawItem(Message& m)

at System.Windows.Forms.ComboBox.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
It looks as though there is a rendering issue manifesting itself here somehow.  Is there anyway for you to produce a quick sample that causes this to happen?  If so, it is just a matter of debugging and plugging the hole Smile
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
The problem goes away if I set UseMultiColumn to False.



I will try and produce a sample, but perhaps with this more info you could try it on your end and see if you can reproduce?



Isn't multi-column a semi-new feature?



Also, I am using DB2 but at this point I have mostly moved past the learning curve of using a database other than SQL Server.



As always that you for your assistance.



I have settings as follows:

PopulationType: BO

two columns

Pipe as the ColumnSeperator "|"

UseMultiColumn = True


Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I will try and produce a sample, but perhaps with this more info you could try it on your end and see if you can reproduce?

I figured that was the case as this is when we custom render.

Isn't multi-column a semi-new feature?

It is...but I am using it in a ton of places in our medical app and as of yet, I have not seen this...but I do believe you Smile  I will keep trying on my end to reproduce.

Also, I am using DB2 but at this point I have mostly moved past the learning curve of using a database other than SQL Server.

I am glad that this has worked out for you.  This should not have any bearing on this particular issue though.

Just as a final thought, you DO have the combo populating with a value for each column, correct?

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I do have it populating with a value for each column yes, I still have had to remove multicomumns, I will try to create a sample to reproduce.



Now I have another issue, my combobox does not properly display the control when it is disabled, the control itself is disabled, and you cant do anything with it, but the data value appears to be enabled, this naturally causes my end user much confusion.



Picture worth 1,000 words.




Keith Chisarik
Attachments
cboDrawError.jpg (94 views, 13.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
OK...I have created a sample that uses the multi-columns as well as the enabled and disabled states....they are both working in the sample.  So you might compare properties to see if there is something else that may need to be set in order to produce your behavior.  Thanks.
Attachments
ComboTesting.zip (89 views, 124.00 KB)
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I was unable to run your code since it was 2008, it hung when at "Searching for Business Objects..."



Out of desperation I loaded the updates here:

http://forum.strataframe.net/Topic12783-22-1.aspx



....and guess what, all my recent problems are gone (/facepalm) , the multi column issues, enabled/disabled draw, and combobox dropdown panes drawing underneath ThemedGroupBoxes, ALL GONE!!!



So.... my questions are as follows:

1) I guess i should load any posted update regardless of if I think it pertains to me or not?

1b) Do I need to load them all? In order?

2) If you guys are on VS2008, I want to be as well. Can I develop using VS2008 against 1.6.1 (DLL version 1.6.0) targeting .NET 2.0? Or do you need to load the 1.6.5 beta?

3) If I can use VS2008, once I project is upgraded to VS2008 can it be downgraded in any way? I have customers that have in-house guys using VS2005 and they don't want to use 2008 for a while. We share code via a source control solution.




Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I missed one, the disabled combo still draws with the text looking like it is not disabled, being that I see you have messed with the disabled forecolors, I am fairly confident this is a bug. (See posted image please).



I see you changed the default DisabledForeColor, I am sure most people like the change from reading these forums, I do not particularly.



Is there a list of what is changed from version to version so I am not caught off guard?



My current customer would say "How am I supposed to tell it is disabled"?



Also with this version, a disabled combo looks very different from a disabled textbox, making my form look very odd.














Keith Chisarik
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
3) If I can use VS2008, once I project is upgraded to VS2008 can it be downgraded in any way? I have customers that have in-house guys using VS2005 and they don't want to use 2008 for a while. We share code via a source control solution.




I just went through upgrading to VS 2008. While I think you can use 1.6.1, you'll have to find the post that indicates how manually set it up for VS2008...the beta has an installer BigGrin



As far as switching between VS2008 and VS2005, it is my understanding that what you are looking at is how does it affect the solution file and how does it affect the project files (when targeting .net 2.0, it doesn't change any of your code). The answer as near as I can tell is that the solution file is incompatible between the two, but project files can be used with VS2005 after they are converted to VS2008 project files.



Sooo, I created a new VS2008 solution file (I copied by VS2005 solution file, then opened it with VS2008). I'm assuming that I'll need to mess with the VS2005 file if I add/remove/rename a project or make changes that are saved in the solution file by opening up the solution in VS2005 and fixing it. But I haven't had to do that yet.



Hope that helps.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Well now that I look more I think you intended things this way, with the text on disabled controls a darker color, but they aren't consistent. A disabled combo without multicolumn turned on has a forecolor that is light gray to match the control border and the dropdown arrow while a multicolumn dropdown has a forecolor that is much much darker, making it look enabled (in my opinion).



Well I was looking for an excuse to start my own control library anyhow Smile



How come the disableForeColor property of a combo is available only in code and not the properties sheet?



The multicolumn dropdown in your example Trent works fine, perhaps this is a 2008 versus 2005 thing?



Reproduce by setting toggling multicolumn on and off, you will see that the disabledforecolor is different, at least in VS2005.



I am glad it no longer blows up Smile

Keith Chisarik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search