Hi,
While my app is running, I can always see this error popping in the output window,
System.Windows.Data Error: 39 : BindingExpression path error: 'IsSpecialRecord' property not found on 'object' ''CxvViewData' (HashCode=59022875)'. BindingExpression:Path=IsSpecialRecord; DataItem='CxvViewData' (HashCode=59022875); target element is 'DataRecordPresenter' (Name=''); target property is 'NoTarget' (type 'Object')
I haven't defined anything called "IsSpecialRecord", where does this come from?
Thanks.
By default, if you do not set RelativeSource, the binding will go up to the DataRecord, which exposes the Cells collection and the DataItem property. If you are trying to get some value in other field, you can use the following
Cells[index].Value
or
Cells[name].Value
inside that binding and not go throught the DataItem.
Hi Alex,
You're right, I'm using "DateItem.[Field Name]" in my binding of controls inside CellValuePresenter. Do you mean I should make it as "Record.[Field Name]"?
From the binding error I believe you are binding to the underlying data object and not to the record.
Maybe you can try putting a RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type igDP:DataRecordPresenter}} in the binding to target the DataRecordPresenter and make sure that the Path goes to the Record and not to the DataItem.
If you still get this error, please give us the binding expression and where you are using it (control template, style, trigger etc) and we will look at it.
Thanks Alex. Then is it normal for me to get this binding error?
Hello,
The IsSpecialRecord is a get-only property of a Record. Special records are Filter Record, Header Record, Summary Record, Template Add Record, etc. This will return true if the record is one of there types.