Browse dialog subclass


Author
Message
Fabian R Silva, -
Fabian R Silva, -
Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)Advanced StrataFrame User (935 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
I trying to make a generic browsedialog, I generate the searchfields from a string array, something like:



'Private pBrowseDialogSearchFieldTexts() As String = {"ID", "Código", "Descripción"}

'Private pBrowseDialogSearchFieldFields() As String = {"idProvincia", "CodProvincia", "DesProvincia"}

Dim iSearchField As Integer = -1

Dim sfd As SearchFieldItem

For Each cSearchField As String In pBrowseDialogSearchFieldTexts

iSearchField += 1

sfd = New SearchFieldItem



sfd.AllowAdvanced = True

sfd.DefaultSearchStyle = MicroFour.StrataFrame.UI.BrowseDialogAllSearchTypes.BeginsWith

sfd.EnumType = ""

sfd.FieldLabelText = pBrowseDialogSearchFieldTexts(iSearchField) '"Customer Name"

sfd.FieldMask = ""

sfd.FieldName = pBrowseDialogSearchFieldFields(iSearchField) '"cust_LastName"

sfd.InitialValue = ""

sfd.Visible = True



'SearchFields.AddRange(New MicroFour.StrataFrame.UI.Windows.Forms.SearchFieldItem() {SearchFieldItem1, SearchFieldItem2, SearchFieldItem3, SearchFieldItem4})

SearchFields.Add(sfd)

sfd = Nothing

Next




When I test the project, it work but when I click on the Browse button from the maintenance toolstrip, an error ocurrs:



ullReferenceException

Referencia a objeto no establecida como instancia de un objeto.



Source : MicroFour StrataFrame UI



Stack Trace:

en MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.CreateAllSearchFieldControls()

en MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogwindow.AddSearchFields()

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

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

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

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

en MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdBrowse_Click(Object sender, EventArgs e)

en System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

en System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)

en System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

en System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

en System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

en System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

en System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

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

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

en System.Windows.Forms.ScrollableControl.WndProc(Message& m)

en System.Windows.Forms.ToolStrip.WndProc(Message& m)

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

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

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





I try to add the Strataframe UI project, to debug the "CreateAllSearchFieldControls" method, but some errors ocurrs, I'm using a 1.6.2 test version to develop.



Can I debug the UI project to see what happen on "CreateAllSearchFieldControls" method or its not posible? if I restore the 1.6.1 dll or something else? thanks!

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