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

SfDataGrid Binding not Updating Within Unactivated TabItems


The SfDataGrid doesn't update it's binding to a DataView filter change if it is on a TabItem that has not been activated since the window has opened.

I have a TabControl with multiple TabItems. Each TabItem contains a SfDataGrid with it's ItemsSource set to a DataView (One DataView for each SfDataGrid). The problem occurs when the window is opened and the DataView filter for the "hidden" SfDataGrids is changed before the TabItem is activated. Once the TabItem has been activated, then the SfDataGrid updates correctly when the DataView filter is changed (even the "hidden" ones).

Please see the attached project. Run the project and click on the filter button and then the "Grid2" tab to show it hasn't been updated (it should contain the same numbers as Grid1). If you run the project again and select the "Grid2" tab and then the "Grid1" tab before clicking the filter button you will see that Grid2 has been updated correctly.


Attachment: TestWPF_c2c37b3b.zip

3 Replies

GL Ganeshkumar Lingappan Syncfusion Team August 11, 2015 03:43 AM UTC

Hi Peter,

Thank you for Contacting Syncfusion Support

We have analyzed your query and while changing the tab, RowFilter will be cleared when loading the SfDataGrid.  Hence you can skip this by overriding the ResetFilter method in GridDataTableCollectionViewWrapper class. Here we have modified the sample attached in the below mentioned location. Please refer the sample and the below Code-Snippet


Public Class GridDataTableCollectionViewExt   

    Inherits Syncfusion.UI.Xaml.Grid.GridDataTableCollectionViewWrapper

    Public Sub New(source As IEnumerable, grid As SfDataGrid)

        MyBase.New(source, grid)

        DataGrid = grid

    End Sub

    Protected Overrides Sub ResetFilter()       

    End Sub
End Class

Sample Location :


PA Peter Aldersley August 11, 2015 04:29 AM UTC

Many thanks Ganeshkumar... that works a treat!


AN Ashok N Syncfusion Team August 13, 2015 03:51 AM UTC

Hi Peter

Thank you for your update. Please let us know if you require further assistance on this.


Live Chat Icon For mobile
Up arrow icon