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 @@ -38,14 +38,12 @@ public MainWindow()
3838
3939 source . SortDescriptions . Add ( new SortDescription ( "ShipName" , ListSortDirection . Descending ) ) ;
4040
41- source . FilterExpressions . Add (
42- FilterFactory . Build ( ( f ) =>
43- {
44- return f . Property ( "ShipName" ) . ToUpper ( ) . IsLessThan ( "G" )
45- . Or ( f . Property ( "ShipName" ) . ToUpper ( ) . IsGreaterThan ( "U" ) ) ;
46- } ) ) ;
41+ grid1 . SelectionMode = GridSelectionMode . SingleRow ;
4742
4843 grid1 . ItemsSource = source ;
44+
45+
46+ //grid1.SelectedItemsChanged += Grid1_SelectedItemsChanged;
4947
5048 //Task.Delay(10000).ContinueWith((t) =>
5149 //{
@@ -56,6 +54,22 @@ public MainWindow()
5654 //});
5755 }
5856
57+ private void Grid1_SelectedItemsChanged ( object sender , GridSelectedItemsChangedEventArgs args )
58+ {
59+ if ( grid1 . FilterExpressions . Count == 0 )
60+ {
61+ grid1 . FilterExpressions . Add (
62+ FilterFactory . Build ( ( f ) =>
63+ {
64+ return f . Property ( "ShipName" ) . ToUpper ( ) . StartsWith ( "ALF" ) ;
65+ } ) ) ;
66+ }
67+ else
68+ {
69+ grid1 . FilterExpressions . Clear ( ) ;
70+ }
71+ }
72+
5973 private void Source_SchemaChanged ( object sender , DataSourceSchemaChangedEventArgs args )
6074 {
6175 System . Diagnostics . Debug . WriteLine ( "schema fetched: " + args . Count ) ;
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ private void KillWorker()
194194 }
195195 }
196196
197- private int _pageSizeRequested = 200 ;
197+ private int _pageSizeRequested = 50 ;
198198 public int PageSizeRequested
199199 {
200200 get
You can’t perform that action at this time.
0 commit comments