Hi all,
Has someone run into this strange ultragrid's bands behaviour: I use same application version connecting to same Database on 2 different computers. The ultragrid's bands are properly displayed on one, but not on the other computer (see the attached screen shots) and I cannot figure out why. Please advise.
If the behavior is different on two different machines, then it stands to reason that something must be different on those machines.
It's hard to tell exactly what's going on there just from a screen shot, but it looks like the layout of the parent band is fine, but the child band is essentially losing the layout. In other words, you have set some layout properties on the child band, such as column captions, the order of the columns, maybe hidden some columns, etc. and all of those settings are being lost and the grid is just showing the child band with the raw layout from the datasource. Does that sounds correct?
One reason that might happen is if the data source doesn't match the layout. For example, suppose one machine (or one user) has different permissions and the data source is returning different columns on one machine than the other. This could lead to the grid's child band layout not matching up to the data source on one machine and so the grid throws away the layout, because it doesn't match the data.
You probably have already considered this, but if not - Are the grid layouts being loaded at run time, if so the two different machines may have different versions of the layouts thus accounting for the view differences. This of course extends to the ultradropdowns as well which could be having their layouts loaded at run time.
Once again good luck.
Lyleh,
Thank you for your response. I am just very puzzled as to why the same executable connecting to the same database, but ran on 2 different machine shows 2 different GUI's (wingrids) to the user: one correct, and one with some bands reset (particularly the columns with ultradropdowns)
The problem I encountered was not as you described. I did resolve the problem. Briefly what I found was happening was related to a change in a database table. Adding or deleting any date elements in the data table then affects data sets which are then coupled to data grids. The data grids would then lose any formatting / arrangements they had and revert to showing all columns in the data set in the data grid. This behavior was not necessarily seen until the application was seen in the production version. What I have done to protect the grid layouts from being lost is that I save all data grid layouts using the Layout wizard. Which then allows me at design time to re-load the previous grid layout, add or remove any columns necessary, then re-save the layout.
In your case what you might try is saving the layouts at design time then loading them at run time to insure you are always getting the correct layout.
Good luck.