When I ask a grid to use the Cardview style, I do not get the labels showing vertically in a single coliumn on the left hand side but instead they are shown horizontally as is the data. I have attached a image showing the effect.
I have not set any other CardView setting but simply set
TreatmentPlansGrid.DisplayLayout.Bands[0].CardView = true;
What else do I need to do?
THanks
Well, that's weird. Are you changing back to UseRowLayouts when you switch to the normal (nonCard) view?
Can you examine the VisiblePosition property of the columns to see if it is actually changing when yuo change views? I can't see any reason why that should happen. Are you sure you are not loading a layout or setting the VisiblePositions in code somewhere?
Here is the second image
I have attached a couple of images showing the card and row views. I am not changing the binding or datasource but simply changing from CardView to row view.
So you are saying that at run-time, the column order is changing from design-time? That might happen if you set the DataSource at run-time to a different data source than the one applied at design-time or if you set the DataSource and DataMember properties separately instead of using SetDataBinding.
You might want to look at this KB article: HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
I have set the VisiblePositions in the designer. I thought that the VisblePositions would be unchanged and did not expect to have to explicitly set them again on switching to the card view.