Hi there,
since years and several versions of the NetAdvantage library my colleagues and I are experiencing a strange behavior which all of us costs a lot of time in total so that's the reason why I'm posting it now.
We have a lot of business classes that are responsible to exchange data with the database server. We are using the MS BindingSource to fill up the WinGrid with our business object's data which works great. Our problem is that WinGrid sometimes temporary looses the 'connection' to the data schema of the business object and when this is estrablished again all column arrangements including groups are lost. This is extremely annoying and time consuming because every time you've to start from scratch by setting it up newly in Visual Studio Designer. I've now written a class that handles that programmatically during FormLoad to overcome that.
For a long time I didn't know where this problem comes from but now I think I've at least a little glue. If I've opened a form containing a WinGrid in Visual Studio Designer, debug the application from Visual Studio with having the form still visible in Designer (the Visual Studio Tab with that form is selected), close the application then all columns in WinGrid disappear in Designer. If I start to design the WinGrid there is no Data Schema established thus I cannot do anything in the column arrangement overview. If I close the WinGrid Designer the Data Schema is established afterwards. When I'm lucky the column arrangements are still there but sometimes they are lost.
When I close the form in Designer after ending debugging the application and the re-open it again this works also fine. It seems that there is a problem when the form is open in the Designer when the debugging session is started and then ended. I’ve set NewBandLoadStyle and NewColumnStyle properties of WinGrid DisplayLayout to Hide but that didn’t change anything.
As I said at the beginning we do have this problem with all NetAdvantage libraries starting from 2007.3, with Visual Studio 2008 and 2010 running on Windows XP Professional 32bit and Windows 7 Professional 64bit.
I wonder, that no other people do have similar problems?
Regards, Wolfgang
Hello Jseeman,
Thanks for your response. Are you able to upload a small sample that reproduce this issue. I`ll be glad to take a look.
Thanks and Regards
Hi Georgi,
I have tried the solution represented in the video and it does not work. Even with the manual datasource assignment it still loses the format.
I am reverting back to 10.3.
Keep this ticket open.
This is a serious problem.
Hello Wolfgang,
I research your issue using your sample and reseaons for this behavior is cause from the BindingSource. The grid designer lists all the bands and columns, if BindingSource provide this information. Sometime you see that the grid at design-time, doesn`t have any rows. It is because your BindingSource is null and grid designer unable to determine the data structure / layout.
Please take a look at the attached video file, where I reproduce your issue and than I provide one possible approach to solve it. Let me know if you have any questions.
Regards
Yes, I have the same problem. Please let me know if there is a solution.
Hello Georgi,
cool, that you are able to see my issue now. Take your time to investigate in it and hopefully their will be a solution for that. I'm just wondering why not more customers do have the problem?
Thanks and kind regards, Wolfgang