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
It looks like you have UseRowLayout set to true on this band. In this case, CardView really only controls the positon of the cards, it doesn't affect the layout of the card itself. So you probably just want to turn of RowLayout. Otherwise, you will need to change the layout of the row.
Thanks Mike,
Setting UseRowLayout to false fixed that problem. Is there a way to control the order that the fields are shown in the vertical stack?
Yes. Typically, you would use the InitializeLayout event and set the column.Header.VisiblePosition for each column in the band.
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.
Hi,
Hm, I just tried this out and setting the VisiblePositon on the column header works fine for me both in CardView and regular view. So I'm not sure why it's not working for you.
Maybe you should Submit an incident to Infragistics Developer Support with a sample showing it not working?
You are right about sizing and re-ordering, right on the grid in the form designer.
I now ensure that UseRowLayout is set to false (by the designer) and is never set to true.In the card view however the VisiblePosition is not being used and the columns are out of order while being correct in the row view.
I have also checked with the debugger that the UseRowLayout stays false.
You can still re-order and re-size columns. In fact, I think you can do right on the grid in the form designer - you don't even have to go into the grid designer to do it. You can allow the users to do this, also, by setting the AllowColMoving and AllowColSizing prorpeties.
Mike,
The reason I check the UseRowLayout is that I can then re-size and re-order the columns in the desiner overview. When you select the alternative Use groups and levels, I cannot see hoe to re-order the coulmns or re-size them. Can you point me at some documentation on how you work with the Groups and levels?
pmoran said:I beleive the UseRowLayout is being set to true because in the Column arrangement overview section under the band I have clicked on the Use Row Layout
Yes, that's correct. But it doesn't seem to me that you need to use RowLayouts here. You just want a basic horizontally aligned set of columns, so using RowLayouts here will just overcomplicated matters.