We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

BindingSource and Grid Grouping Control

Hi I set GridGroupControl.dataSource to a bindingSource. When I do sort on the table and use bindingSource.moveNext or bindingSource.movePrevious, it does not behave as MS DataGridView which just move the selected row to up/down based on next/previous. Is this a bug I should submit an inccident. Thanks

3 Replies

AD Administrator Syncfusion Team January 21, 2006 04:20 AM UTC

Hi Ken, when you do the sorting you do the sorting on the TableDescriptor, correct? In that case the records are sorted inside the GridGroupingControl and the original underlying datasource is not sorted. Therefore when you then navigate in the underlying datasource the navigation will still be in the old sort order. You should then navigate through grid.Table.SortedRecords insteads. You can also instruct the engine to pass on sorting to the underlying dataview Engine.AllowedOptimizations = EngineOptimizations.PassThroughSort; Stefan > >Hi > >I set GridGroupControl.dataSource to a bindingSource. When I do sort on >the table and use bindingSource.moveNext >or bindingSource.movePrevious, >it does not behave as MS DataGridView >which just move the selected row >to up/down based on next/previous. > >Is this a bug I should submit an inccident. > >Thanks


KE Ken January 25, 2006 11:59 PM UTC

hi, First, grid.Table does not have sortedrecord. Second, set Engine.AllowedOptimizations = EngineOptimizations.PassThroughSort does not not either. I did put the above line during the form_load, right before the bindingSource1.moveNext and bindingSource1.moveNext. Still it does not work. Any better solution. >Hi Ken, > >when you do the sorting you do the sorting on the TableDescriptor, correct? > >In that case the records are sorted inside the GridGroupingControl and the original underlying datasource is not sorted. Therefore when you then navigate in the underlying datasource the navigation will still be in the old sort order. You should then navigate through grid.Table.SortedRecords insteads. > >You can also instruct the engine to pass on sorting to the underlying dataview > >Engine.AllowedOptimizations = EngineOptimizations.PassThroughSort; > >Stefan > > >> >>Hi >> >>I set GridGroupControl.dataSource to a bindingSource. When I do sort on >>the table and use bindingSource.moveNext >>or bindingSource.movePrevious, >>it does not behave as MS DataGridView >>which just move the selected row >>to up/down based on next/previous. >> >>Is this a bug I should submit an inccident. >> >>Thanks


AD Administrator Syncfusion Team January 26, 2006 08:40 PM UTC

Ken, Sorry - I mean FilteredRecords, not SortedRecords. Attached find an example. You can also comment out the lines in the Form1 ctor. Then you see PassThrough mode in action. ggcbindingsource.zip Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon