Hi,
Normal 0 21 false false false DE-CH X-NONE X-NONE MicrosoftInternetExplorer4
I‘m trying to achive a layout of the xamDataGrid like in the attached screenshot. Is this possible?
Hi Petar,
I would like to get a grid like the second picture. This picture is NOT a screenshot. I faked it; I composed it of several screenshots...
Regards,
Dunken
Hi Dunken,
Excuse me for the late reply. Please elaborate what exactly do you mean by "But the entire grid should look like (--> fake):" and how do you want/expect it to appear.
Looking forward to your reply.
Regards Petar.
Petar,
Thank you very much for helping me. Sorry for being fussy... but I still don't get exactly what I'm looking for. Your second hint gave me this:
The rows look okay now. But the entire grid should look like (--> fake):
My code:
<igDP:XamDataGrid Name="xamDataGrid1" BindToSampleData="True" > <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoArrangeCells="Never" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts > <igDP:FieldLayout > <igDP:FieldLayout.Fields> <igDP:UnboundField Label="Super Header" Column="1" ColumnSpan="2" > <igDP:UnboundField.Settings> <igDP:FieldSettings CellMaxHeight="0" /> </igDP:UnboundField.Settings> </igDP:UnboundField> <igDP:UnboundField Name="Test" Row="1" Column="0" /> <igDP:Field Name="name" Row="2" Column="0" /> <igDP:Field Name="salary" Row="1" Column="1" RowSpan="2" /> <igDP:Field Name="email" Row="1" Column="2" RowSpan="2" /> <igDP:Field Name="department" Row="1" Column="3" RowSpan="2" /> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
This is because I have set the department Field's RowSpan="2" if you set it to 1 it will be the same as "salary" and "email". If you want to make "salary" and "email" to span two rows like "department" an still be under the SuperHeader you can set their RowSpan="2" and set "department" and "Test" their Row="1" and also ""name" Row="2" .
Please let me know if either one is what you were looking for.
I changed your example slightly. As shown in the first post, I need stacked cells in a row (b/d and c/e). Therefore I added a (unbound) field Test:
<igDP:UnboundField Name="Test" Row="0" Column="0" /> <igDP:Field Name="name" Row="1" Column="0" />
As you can see below, salary and email are not aligned like department...