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?
Hello,
Here is a link to our documentation describing Field positioning: http://help.infragistics.com/Help/NetAdvantage/WPF/2010.3/CLR4.0/html/InfragisticsWPF4.DataPresenter.v10.3~Infragistics.Windows.DataPresenter.Field~Row.html
And here is a code snippet you can try out:
<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:Field Name="name" Row="0" Column="0" RowSpan="2" />
<igDP:Field Name="salary" Row="1" Column="1" />
<igDP:Field Name="email" Row="1" Column="2" />
<igDP:Field Name="department" Row="0" Column="3" RowSpan="2" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Please let me know if you require any further assistance on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Petar, thank you for replying.
It's almost what I'm looking for... In your case you get the "invisible" SuperHeader-field in each row. Therefore the textboxes for salary and email are displayed on the bottom of the row instead in the center like department.
Can that be changed?
Excuse me for the late reply, I have been looking into your requirement, however the XamDataGrid does not support that. I can suggest you try out the XamGrid which was imported to WPF from our Silverlight package and which has the functionality you need under GroupColumns:
http://samples.infragistics.com/sllob/RunSamples.aspx?cn=grid#/grid/group-columns
Hope this helps.
Hi Petar,
I need similar solution, but when I use your code, I see every data item in "two rows", is there any way to see the actual data items in "one row", and headers in multiple rows.
Hi Dunken,
I finally saw what you mean. There is no built-in functionality for that, and the only thing I could think of is creating a style for the CellValuePresenter class which will be applied to the Cells that need to be moved/aligned. I have created a sample project to illustrate the approach (Grid_SuperHeader.zip).
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
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.