Hi guys!
I need to use the XamDataGrid like a matrix by binding it to the Rows collection of a DataTable.The DataTable is filled with objects, and I want to use the property of an object to determine the layout (such as color, text, if it is read only or not) of the cell is is presented in.Does anyone know how I can do that?
I have tried creating a style for the CellValuePresenter, but I'm not able to access my objects in any way using data binding because they are wrapped inside the DataRecord.DataItem, and the DataItem is my entire DataRow, not just the object at the [row,column] index that gets displayed in the XamDataGrid cell.So how do I get access to the object that is displayed in a cell, and not the DataRecord itself?
Thanks!
After some research, I found the answer to my question in this post;
http://forums.infragistics.com/forums/t/13120.aspx
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Content.ExistsAtTarget}" Value="True">
<Setter Property="Background" Value="Whitesmoke" TargetName="MainBorder"/>
</DataTrigger>