UXQueryBuilder: Unable to get property dropdowns working

3 replies. Last post: July 4, 2014 3:35 AM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Trying to get the UXQueryBuilder functional in a small WPF project, but after hitting the dropdown(s) to select a property, receive an exception "Object Reference Not Set to an Instance of the Object". I know, something stupid I'm doing, but I can't seem to track down the missing piece in the configuration.

Binding Errors from the output window:

System.Windows.Data Information: 41 : BindingExpression path error: 'Name' property not found for 'object' because data item is null.  This could happen because the data provider has not produced any data yet. BindingExpression:Path=Name; DataItem=null; target element is 'ContentControl' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 20 : BindingExpression cannot retrieve value due to missing information. BindingExpression:Path=Name; DataItem=null; target element is 'ContentControl' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 21 : BindingExpression cannot retrieve value from null data item. This could happen when binding is detached or when binding to a Nullable type that has no value. BindingExpression:Path=Name; DataItem=null; target element is 'ContentControl' (Name=''); target property is 'Content' (type 'Object')
System.Windows.Data Information: 10 : Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=Name; DataItem=null; target element is 'ContentControl' (Name=''); target property is 'Content' (type 'Object')

 

Overview:
WPF 'Client' Application loading OData from an asp.net web site with a WCF Service (EF5, .nET 4.5, C#)

<Intersoft:UXQueryBuilder x:Name="QryBuilder"
CollectionView="{Binding People}" Intersoft:DockPanel.IsFillElement="True" ObjectType="{Binding ObjectType}" PropertyListMode="All" QueryOperation="Client" />

Here is the UXGridView that is using the same underlying PagedCollectionView to display the data, everything works fine here.

  <Intersoft:UXGridView AutoGenerateColumns="False" EnableRowVirtualization="True" QueryOperation="CLient" SortDescriptors="{Binding People.SortDescriptors,Mode=TwoWay}" ItemsSource="{Binding People,Mode=TwoWay}" SelectedItem="{Binding SelectedPerson,Mode=TwoWay}">

 Behind the scens in the ViewModel

public Type ObjectType

{
get { return typeof(LwCiPerson); }
}

<model constructor... excerpt>
_lstPeople = new ObservableCollection<LwCiPerson>();

People = new PagedCollectionView(LstPeople);

_people.SortDescriptions.Add(new SortDescription("NameLast",ListSortDirection.Ascending));
_people.SortDescriptions.Add(new SortDescription("NameFirst", ListSortDirection.Ascending));            

_people.FilterDescriptions.Add(new FilterDescription { PropertyName = "Modified", Value = DateTime.Today, Operator = FilterOperator.IsLessThanOrEqualTo });
_people.FilterDescriptions.Add(new FilterDescription { PropertyName = "Modified", Value = DateTime.Today.AddDays(-30), Operator = FilterOperator.IsGreaterThanOrEqualTo });

<end model constructor excerpt>

The samples are simple enough, and reading through the client documentation, I don't really see anything that jumps out and says "doh, you missed this"

Anyone have any thoughts on what I'm overlooking here? This is just a small data browsing tool I'm developing to review some data in technical support situations, so it's not mission critical. I have an existing way to filter the data that is quite a bit more limited, but wanted to see if I could accomplish the same functionality using UXQueryBuilder as it is a lot more functional, and intuitive. This, in conjunction with a UXPropertyGrid, makes data review at a client site wonderfully simple when you don't have access to SQL Mgmt Studio and are investigating an issue.

Thanks for any help!

-Patrick

All times are GMT -5. The time now is 11:59 AM.
Previous Next