File tree Expand file tree Collapse file tree
DataSource.DataProviders.OData/ODataSampleApp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 <grid : XGrid .Columns>
2020 <grid : TextColumn Key =" CustomerID" HeaderText =" Customer ID" />
2121 <grid : TextColumn Key =" ShipName" HeaderText =" Ship Name" />
22- <grid : TextColumn Key =" OrderID" HeaderText =" Order ID" />
22+ <grid : NumericColumn Key =" OrderID" HeaderText =" Order ID" />
2323 <grid : TextColumn Key =" ShipCountry" HeaderText =" Ship Country" />
2424 </grid : XGrid .Columns>
2525 </grid : XGrid >
Original file line number Diff line number Diff line change @@ -34,18 +34,14 @@ public MainWindow()
3434 DesiredPageSize = 200
3535 } ;
3636
37- source . SortDescriptions . Add ( new SortDescription ( "OrderID" , ListSortDirection . Descending ) ) ;
38- //source.FilterExpressions.Add(DataSourceFilterExpression.CreateSimpleOperation(
39- // "ShipName", DataSourceExpressionOperatorType.Equal, "Wartian Herkku"));
37+ source . SortDescriptions . Add ( new SortDescription ( "ShipName" , ListSortDirection . Descending ) ) ;
4038
41- //Task.Delay(8000).ContinueWith((t) =>
42- //{
43- // Dispatcher.BeginInvoke(new Action(() =>
44- // {
45- // grid1.SortDescriptions.Clear();
46- // grid1.SortDescriptions.Add(new DataSourceSortDescription("OrderID", false));
47- // }));
48- //});
39+ source . FilterExpressions . Add (
40+ FilterFactory . Build ( ( f ) =>
41+ {
42+ return f . Property ( "ShipName" ) . ToUpper ( ) . IsLessThan ( "G" )
43+ . Or ( f . Property ( "ShipName" ) . ToUpper ( ) . IsGreaterThan ( "U" ) ) ;
44+ } ) ) ;
4945
5046 grid1 . ItemsSource = source ;
5147 }
Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ protected override IDataSourceVirtualDataProvider ResolveDataProviderOverride()
4444
4545 private void OnBaseUriChanged ( string oldValue , string newValue )
4646 {
47- ResetCache ( ) ;
4847 if ( ActualDataProvider is ODataVirtualDataSourceDataProvider )
4948 {
5049 ( ( ODataVirtualDataSourceDataProvider ) ActualDataProvider ) . BaseUri = BaseUri ;
5150 }
51+ QueueAutoRefresh ( ) ;
5252 }
5353
5454 /// <summary>
@@ -74,11 +74,11 @@ public string BaseUri
7474
7575 private void OnEntitySetChanged ( string oldValue , string newValue )
7676 {
77- ResetCache ( ) ;
7877 if ( ActualDataProvider is ODataVirtualDataSourceDataProvider )
7978 {
8079 ( ( ODataVirtualDataSourceDataProvider ) ActualDataProvider ) . EntitySet = EntitySet ;
8180 }
81+ QueueAutoRefresh ( ) ;
8282 }
8383
8484 /// <summary>
You can’t perform that action at this time.
0 commit comments