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?
The UseRowLayout property is set to true by the generated designer code. I was setting it to false when switching to CardView to stop all the labels etc showing as a single horizontal line of fields.
Switching back to no CardView I was restoring the UseRowLayout property to its original value. If I leave it false when switching from CardView then the columns in the non CardView are shown in the same order as in the CardView. What I dont understand now is why the VisiblePosition seems to work iniitally but not after switching back from CardView.
I'm really not sure why it worked initially. But UseRowLayout is not the default option for the grid. So if this property was being set int he Designer-generated code it's because you set the property at desig-time - perhaps you did this in the grid designer without realizing it.
Mike,
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 (primarily because I have no idea what Use groups and levels option means). Selecting that option gave me the ahorizontal row as I expected. You only have the choice of the two options. One or othe rhas to be selected.
i also have this option set by the designer in 17 grids in th eapplication and all of them are obeying the VisiblePostion attribute setting.
Looking at the RowColumnInfoLayout I cannot even work out how you control the relative positions.
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.
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?
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.