I have search for this for a while now and feel like an idiot for asking. However, how can I determine the binding path for a given CellValuePresenter. I have looked at the field, the cell, and the CellValuePresenter's template and can not find the binding path anywhere. Is this possible?
Thank you
Devin
Hello dnapoleon518,
Thank you for feedback.
If you have any other questions feel free to ask.
This is resolved I apologize that I didn't mark an answer sooner. The the propertypath was the key in code behind.
Thanks
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
I have been looking into your previous reply and the Fields are used for displaying simple properties. When using a Field, a binding is created to the property that corresponds to the value of the Name property of the field. You can use UnboundFields when you wish to display properties of a complex objects. When you work in code-behind using the PropertyPath property you can select the desired property of the Business Object and then set the BindingPath of your UnboundField to it like :
UnboundField firstNameField = new UnboundField();
UnboundField
firstNameField = new UnboundField();
. . .
PropertyPath path = new PropertyPath("FullName.FirstName");
firstNameField.BindingPath = path;
If you work in XAML you can set the desired property of the Business Object directly to the BindingPath like :
<igDP:UnboundField
BindingPath="FullName.LastName"
BindingMode="TwoWay" />
For more information about displaying a Complex Property you can look through the following two links :
http://help.infragistics.com/NetAdvantage/WPF/2011.2/CLR4.0/?page=xamDataPresenter_Displaying_a_Complex_Property.html
http://help.infragistics.com/NetAdvantage/WPF/2011.2/CLR4.0/?page=xamDataPresenter_Displaying_a_Complex_Property_XAML.html
If you have any other questions, feel free to ask.
There is no database, this is a Business Object. Also, there is no select statement. I figured out how to do it by looking at the Infragistic's source code. The cell.cs file has a class called UnboundCell which has a method called VerifyBindingStatus which led me to the answer.
I check the CellValueProvider to get the field property, I then check the type to see if the Field is an UnboundField. Next, I convert the Field to an UnboundField and dim a PropertyPath equal to the UnboundField's BindingPath.
Furthermore, the result of a LINQ to Objects query without a select statement is the only way that I can bind to a source and not lose the events associated with source objects (x_set and y_set) in the query. This results in a complex binding expression which has an enumerable of an anonymous type that has two properties that point to x_set and y_set. Which is the reason for using UnboundFields. The only question that remains is, can you bind a Field (not an UnboundField) to a complex binding expression (x.id).