Error when adding new row, bound combobox


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K 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
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Keith,

OK...I think that there is one thing going on here...first of all, we DID make a change a while back to allow the textboxes to support a DisabledForeColor and DisabledBackColor...however, the ComboBox doesn't have this option yet as it is MUCH more difficult to manually render a combo without requiring Application Themes to be turned on....one thing that you can do is set teh IgnoreManageReadonly state to False on the combos and it should look as though it is enabled.

The reason the default enabled colors are more legible on the textboxes is due to the previous complaints that the standard disabled colors were too dark...now as for the difference between your product and style code combos...I don't know.  I have tried my very best to reproduce this per your instructions and I have not been able to.  To rework the way that the combo renders altogether by adding the DisabledFore and BackColor properties is not going to happen this go around...it is not a quick fix...so we need to figure some other way to get you going.  I hope that this might help...if not then I will have to look at your project to see and environment to see what else could be going on.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Keith...here is a little more for you.  You are right in that when the Multi-Column option is used, the static state that is rendered is rendered by us rather than the standard .NET rendering (only because we are performing an OwnerDraw) and you get this appearance when the combo is set as a DropDownList instead of a DropDown.  So, you can do several things....first, set the other combo to use multi-columns but only supply a single column...or change the DropDownStyle when the editing state of the BO changes..this, too, would make these render in the same fashion.  The combo rendering is going to get a makeover before long and I will make this that all states and settings render the same, but unfortunately we are still using the standard .NET combo rendering for most cases.  Hope this gets you going.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Keith Chisarik - 17 Years Ago
Greg McGuffey - 17 Years Ago
Keith Chisarik - 17 Years Ago
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Keith Chisarik - 17 Years Ago
Keith Chisarik - 17 Years Ago
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Keith Chisarik - 17 Years Ago
Keith Chisarik - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search