Hi,
I'm trying to get the layout of a xamDataGrid to look like the below template but I'm having problems, any assistance would be appreciated. Basically display rows like the below with some kind of visual separater between rows
label 1: column1
label 2: column2
--------------------------------
That was it. Thanks!
Troy,
You have set the ViewSettings' Orientation property to Horizontal, which is why you are seeing this. I believe you want to set that to Vertical.
Hi Alex,
I have done what you said below and I still can not get each row to appear below each other, this is what it currently looks like,
But I want the rows to appear vertically and not horizontally, so that it looks like,
Description: GM
Url: www.gm.com
---------------------------------
Description: GM Technician Login
Url: www.cbc.ca
Thansk,
Troy
Well, the exception states that you are trying to add items both in the DataItems collection and the DataSource. If you add something in the XAML between the opening and closing tag of the XamDataGrid (which does not begin with <igDP:XamDataGrid. .. this will be considered as a DataItem. I am guessing that you are missing some opening tag - for example of the FieldSettings around this line :
<!--<igDP:FieldSettings CellContentAlignment="LabelLeftOfValueStretch"/>-->
You are not opening the XamDataGrid.FieldSettings tag anywhere in the provided xaml. You should use:
<igDP:XamDataGrid.FieldSetttings>
<igDP:FieldSettings CellContentAlignment="LabelLeftOfValueStretch"/>
</igDP:XamDataGrid.FieldSetttings>
Thanks for your response. I'm getting pieces of it but I'm still missing something as it's still not displaying correctly Below is the xaml that I currently have.
The line commented out relating to CellContentAlignment causes a runtime error when it's executed that reads "Can't set the DataSource on a DataPresenter that has items added explicitly through the DataItems collection." All I'm doing for this is reading data from a table into a DataTable and then setting the DataContext of the XamDataGrid to the DataTable.
<
="None">
>
="Horizontal"/>
="description"/>
="Collapsed"/>
="Visible"/>