Browse Dialog index was out of range error.


Author
Message
Keith Gordijn
Keith Gordijn
StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)
Group: Forum Members
Posts: 35, Visits: 2.6K
Hi Guys,



I had two maintenance forms with browsedialogs one for contacts and one for clients both of which have been working for some time. Recently I created a person table to replace a contact and client table. As part of this change I used the same dialog boxes but replaced the BusinessObjectType for the PersonBO and also the search fields for the person fields I want. Everything compiles fine.



However, now when I select the search action I get a dialogbox with:



Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index





My log file contains the following:

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)

at System.ThrowHelper.ThrowArgumentOutOfRangeException()

at System.Collections.Generic.List`1.get_Item(Int32 index)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.SetGroupBoxDimensions()

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow..ctor(BrowseDialog browse, Boolean PopulateOnShow)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog(Boolean PopulateOnShow, IWin32Window ResultsWindowOwner)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog(Boolean PopulateOnShow)

at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog()

at FitTrack.ContactMaintenance.SearchForRecord() in C:\Projects\FitTrack\FitTrack\FitTrack\Dialogs\Maintenance\ContactMaintenance\ContactMaintenance.cs:line 307

at FitTrack.ContactMaintenance.lnkFindContact_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e) in C:\Projects\FitTrack\FitTrack\FitTrack\Dialogs\Maintenance\ContactMaintenance\ContactMaintenance.cs:line 105

at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)

at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

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

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

at System.Windows.Forms.LinkLabel.WndProc(Message& msg)

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)




I have tried everything I could find on the forum related to this type of problem, ie. registry paths, recreating the searchfields, even recreating the browsedialogs and have had no luck.



Other forms that I have not changed still work ok and my eyes are hanging out trying to find what is wrong. One thing I have found that is different is the non working browsedialogs have the line searchFieldItem2.FieldType = System.Data.DbType.AnsiString; in for example the ContactBrowseDialog.Designer.cs while working browsedialogs do not have this in their designer.cs files..



Anyway I am rapidly tearing what hair I have left out so any help would be great.



TIA,

Keith
Attachments
index_out_of_range.png (139 views, 5.00 KB)
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