Hi,
We have recently upgraded from 2006.1 to 2012.2 winforms components.
We have an application that has a grid with card view in a child band. The card view horizontal scroll bar is not linked to the parent grid horizontal scroll bar.
I have attached an image to shows the app with card view on show.
When I double click on a cell in the card view a dialogue box appears. If I close the dialogue box, the card view H scroll bar shoots to the left.
In version 2006.1 the scroll bar stayed where it was at.
As far as I can see, the only code to have changed is:
bodBand.UseRowLayout=true; was changed to bodBand.RowLayoutStyle = RowLayoutStyle.GroupLayout;
and PlanGrid.SupportThemes=false; was changed to PlanGrid.UseOsThemes = DefaultableBoolean.False;
Has there been any changes to settings in the grid?
Thanks
David
Hi David,
From 2006 to 2012 is a pretty big jump. There have been hundreds of bug fixes and changes to the grid in that period of time. If the behavior changes, then this could be a bug in the grid, or it could also be something that was a bug and is now fixed.
I can't think of any reason why the scrollbar should be moving just from closing a dialog, though. There must be something in your code that is affecting the grid or it's data source that is triggering this. I'm afraid that I don't have any guesses as to what it might be off the top of my head. What happens when you close the dialog? What is your code doing at that point?
If you can duplicate the behavior in a small sample project and post it here, we would be happy to take a look at it and find out why it's happening.
That is a good point well made.
Separately, our upgrade from 2006 to 2012 was surprisingly smooth. Well done for not making major breaking changes between these 2 releases.
Back to my problem, I have written a small test app, but cannot replicate the problem yet.
The underlying data source is a DataSet with 2 DataTables (All within the System.Data namespace). When the dialogue box is closed (this action is clearly not the cause of the symptoms) the underlying data source is processed. The appropriate DataRow is found, and one of the cells is set to DBNull.Value.
When this happens the grid's InitializeRow event is fired. I've put a break point at the top of this and I've added Application.DoEvents() at the top, this shows that the scroll bar shoots to the left when Application.DoEvents() is fired, and not because of any code within InitializeRow.
I don't think any other event is being fired in the grid.
I cannot see any events being set to the underlying datasource.
I will continue to add the particular grid properties to my test app until hopefully I find the one that is causing my issue.