SF Listview Behavior(Not Synching with SF MaintenanceForm SF controls and Toolstrip)?


SF Listview Behavior(Not Synching with SF MaintenanceForm SF controls...
Author
Message
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Hey Guys,

I started using the Win SF Listview (been a couple of years) and cannot make it synch with the controls on the SF Maintenance form and Maintenance Toolstrip.
  • Created a SF Maintenance form.
  • Dropped a BO on the form.
  • Dropped LV and Controls on the form
  • Linked the controls and LV to the BO.
  • BO.Fillall in parentformloading
  • Configured Businesslayer Copyfrom
  • Created Columns
  • Used BO Key for tag.
When the form loads, The lv displays data but is not in sync with the controls or toolstrip? I even downloaded and tried the old example that works fine.

Win7

VS2010

Latest SF Version (Win Project)

Thansk much

Michael
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Any Ideas?

UIException
  Dynamically populating the ListView failed.  Could not create and fill the business object of type 'BE_WIN_ENGINE.BO_KBTypeCodes'
TargetInvocationException
  Exception has been thrown by the target of an invocation.
NullReferenceException
  Object reference not set to an instance of an object.

Source     : MicroFour StrataFrame UI

Stack Trace:

   at MicroFour.StrataFrame.Business.BusinessLayer.CopyDataFrom(BusinessLayerBase BusinessObject, BusinessCloneDataType CopyType)

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.GetFilledBusinessObject(Object[] Parameters)

   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.PopulateListView(Object[] Parameters)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.InitializeObject()
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()
   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.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)
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Michael,

Apparently your Listview Population settings is configured to "CopyDataFrom(....)", if that is the case, you have to do the following:
  1. Change your PopulateOnFormLoad to "Manual"
  2. Add code in your listview.ListPopulating() event to tell the listview which is the BO to copy the data from and the type of clone to be done, something like this:
    Private Sub lvPolicy_ListPopulating(ByVal e As MicroFour.StrataFrame.UI.ListPopulatingEventArgs) Handles lvPolicy.ListPopulating
        e.Parameters(0).Value = Me.bizPolicy1
        e.Parameters(1).Value = MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromDefaultView
    End Sub


Then you need to manually refresh your listview to do the synchronization with your Primary BO.Navigated() event and probably in your form's OnLoad.


Edhy Rijo

Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Thanks Edhy,

I have been using the datagridview for all solutions in the past but decided to try the listview after all this time.

Michael
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Michael,

Yeap, ListViews are pretty good unless you have to display many records over 100+ then it is a bit slow, the new StrataListView still in beta is much better even though does not have all the automation I posted a subclass here with some automation but today I am mostly using DevExpress Grid which is by far much better than everything I have seen.

Edhy Rijo

Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Ahww, Ok,

I use the infragistics grid for large list where functionality is critical and the MS datagridview for code lookup list.

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