StrataFrame Forum

BO events not firing with DataGridView inside ThemedGroupBox

http://forum.strataframe.net/Topic23151.aspx

By Edhy Rijo - 5/15/2009

Hi Trent,

I am working with a DataGridView and noticed that the BO navigated event is not being fired when the DataGridView is in a ThemedGroupBox.



I tested this with the BusinessBindingSource VB Sample which I am attaching it here. Please let me know if there is a way for me to fix this before an update is released, I need to show up a demo next Monday May 18th 2009.



Thanks!
By Trent L. Taylor - 5/18/2009

Actually this just needs a refresh.  This is actually a .NET reflection thing.  The reason is that since the DataGridView has a different parent container that the grid is not automatically refreshing because the parent container in which is resides did not refresh.  So this is actually by design on the grid.  To get it to update, just add the following code in the Navigated event of the BO:

Me.DataGridView2.Refresh()

That will refresh the grid and sync the index as well for that particular grid.

By Edhy Rijo - 5/18/2009

Thanks for the info.
By Edhy Rijo - 5/28/2009

Hi Trent,

I am back trying to make the grid works since I need to allow the user to be able to modify 2 columns values and in this case I can not use a ListView BigGrin.



I tried the following code in the previously attached sample:





Private Sub Customers_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles Customers.Navigated

Me.DataGridView2.Refresh()

Me.lblRowIndex.Text = Me.Customers.CurrentRowIndex.ToString()

End Sub





Still I don't see the Me.DataGridView2 being refreshed. But at any rate, to be clear this is what I am expecting from the DataGridView2 to work:

1.- The Me.DataGridView2 is in a ThemedGroupBox.

2.- When moving the record pointer in the Me.DataGridView2, that it will update the Me.lblRowIndex the same way it is done when moving the record pointer in the Me.DataGridView1.
By Trent L. Taylor - 5/28/2009

Yeah, and I have set this up and it is working. Have you looked at the grid sample that comes with the framework? I have tried this a number of different ways and they are all working...so I need to get in a "not working" BigGrin state so that I can help you.



Using your sample this is working on my side. Let me know if this is not the desired results.
By Edhy Rijo - 5/28/2009

Hi Trent,



I saw your video and noticed it is working on your end, unfortunately that is not my case, see the attached video of the same sample project you have.



Probably we don't have the same SF assemblies? See the picture to see what I have from the latest one posted so far 1.6.6.9.



Any ideas!
By Trent L. Taylor - 6/1/2009

To be honest, I think that you have something else going on.  Yes, it very well could be assemblies, but which assemblies you are fighting and which are being pulled will be the thing to determine. 

When you look at the references, where are the assemblies pointing when you look at the assembly path within the sample project?

By Edhy Rijo - 6/1/2009

In the BusinessBindingSourceSample all SF assemblies are pointing to



C:\Program Files\Common Files\MicroFour\StrataFrame\





In my application I have these:



C:\Windows\assembly\GAC_MSIL\MicroFour StrataFrame Base\1.6.0.0__99fe9917f71608a7\MicroFour StrataFrame Base.dll

C:\Windows\assembly\GAC_MSIL\MicroFour StrataFrame Business\1.6.0.0__99fe9917f71608a7\MicroFour StrataFrame Business.dll

C:\Program Files\Common Files\MicroFour\StrataFrame\MicroFour StrataFrame DBEngine.dll

C:\Program Files\Common Files\MicroFour\StrataFrame\MicroFour StrataFrame Infragistics Wrapper.dll

C:\Windows\assembly\GAC_MSIL\MicroFour StrataFrame Security\1.6.0.0__99fe9917f71608a7\MicroFour StrataFrame Security.dll

C:\Windows\assembly\GAC_MSIL\MicroFour StrataFrame UI\1.6.0.0__99fe9917f71608a7\MicroFour StrataFrame UI.dll





I posted a message a week ago about this very same issue I noticed my SF assemblies being used from different locations. Just to remind you I am using Vista 64bits.
By Trent L. Taylor - 6/1/2009

Has nothing to do with 64-bit...I am running 64-bit as well. This is how .NET operates. Within the designer, it may pull from the Program Files location since this is where the designer points. However, the GAC will ultimately be used at run-time if they are there. This is one thing that can be frustrating about .NET design-time IDE.
By Edhy Rijo - 6/1/2009

Trent L. Taylor (06/01/2009)
Has nothing to do with 64-bit...I am running 64-bit as well.




In your screenshot I noticed that the assembly path is C:\Program Files (x86)\Common Files and mine are just C:\Program Files\Common Files, is this correct?
By Trent L. Taylor - 6/2/2009

Shouldn't matter. This is not determined by SF but rather the OS. So this shouldn't matter.
By Edhy Rijo - 6/2/2009

Ok, any other suggestions as this thing is still not working for me?  I was able to force the datagridview to synch with the BO by navigating the BO to the selected grid record, but I am still puzzle why this is not working on my site at two different projects, the sample one and my own as it works for you?

It is simply a very frustrating situation since last week when I started using the datagridview and the BBS. BigGrin

By Trent L. Taylor - 6/2/2009

Edhy, do you by chance have a virtual machine setup anywhere? I would be curious to load the most recent SF assemblies and the sample in a VM session to see if the problem persists. This way you could at a minimum isolate what is going on. So you would NOT load VS or install SF in the GAC. Just copy them to a local folder with the sample, load SQL Server, and then add the SF sample DB to see if it works. This would be my next step in trying to isolate the problem.
By Edhy Rijo - 6/2/2009

Thanks Trent,



I will test it as requested, it may take a day or two, but definitely I want to get to the bottom of this issue.
By Trent L. Taylor - 6/2/2009

Well, me too. Because there is really something fishy here. So once you have a VM setup, we can copy some assemblies in and out to see where your issue may be. This was we have a structured approach instead of a shotgun approach.