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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Data load very slow or no filtering. Need Help !

Thread ID:





130713 May 28,2017 04:34 PM UTC Jun 5,2017 03:16 AM UTC Xamarin.Android 3
Tags: SfDataGrid
Przemyslaw Kolodziejski
Asked On May 28, 2017 05:18 PM UTC

Adds data using datatable. How to add filtering or how to speed up loading to table using eg ObservableCollection.(1 row + open activity - dt = 3sec is ok, OC = 20 sec)

Sivaraman Sivagurunathan [Syncfusion]
Replied On June 1, 2017 03:21 AM UTC

Hi Przemyslaw Kolodziejski, 
Thanks for contacting Syncfusion Support. 
Regarding your first query(Data load very slow): 
We have checked your query and prepared sample for your requirement. But we are unable to reproduce the issue in our side. We have checked the loading time of SfDataGrid with 1000 rows and the grid takes 890ms in simulator and 1052ms in device. We have attached a sample for your reference and you can download the same from below link. 
Regarding your second query: 
We have checked your query. You can add the filtering while using DataTable as Itemsource. It can achieve by using RowFilter property. 
The below code illustrates how to add filtering in SfDataGrid while using DataTable. 
public class MainActivity : Activity 
    SfDataGrid sfGrid; 
    FilteringViewModel viewModel; 
    SearchView filterText; 
    protected override void OnCreate(Bundle bundle) 
        LinearLayout linear = new LinearLayout(this); 
        linear.Orientation = Orientation.Vertical; 
        sfGrid = new SfDataGrid(this); 
        sfGrid.ColumnSizer = ColumnSizer.Star; 
        viewModel = new FilteringViewModel(this); 
        sfGrid.ItemsSource = new GridDataTableCollectionViewExt(this.sfGrid, (IEnumerable)viewModel.DataTable.DefaultView); 
        filterText = new SearchView(this); 
        filterText.SetQueryHint("Enter the Text to filter"); 
        filterText.QueryTextChange += OnFilterTextChanged; 
        viewModel.filtertextchanged = OnFilterChanged; 
    void OnFilterChanged() 
        if (sfGrid.View != null) 
            var rowfilter = string.Empty; 
            for (int i = 0; i < this.sfGrid.Columns.Count; i++) 
                var colfilter = string.Empty; 
                colfilter = colfilter.Predicate(this.sfGrid.Columns[i].MappingName, filterText.Query, FilterType.Contains); 
                if (string.IsNullOrEmpty(rowfilter)) 
                    rowfilter = "(" + colfilter + ")"; 
                    rowfilter = rowfilter.OrPredicate() + "(" + colfilter + ")"; 
            (this.sfGrid.View as DataTableCollectionView).ViewSource.RowFilter = rowfilter; 
    void OnFilterTextChanged(object sender, SearchView.QueryTextChangeEventArgs e) 
        viewModel.FilterText = (sender as SearchView).Query.ToString(); 
public class GridDataTableCollectionViewExt : GridDataTableCollectionViewWrapper 
    public GridDataTableCollectionViewExt(SfDataGrid dataGrid, IEnumerable source) 
                                            : base(source, dataGrid) 
    public override void RefreshFilter(bool isProgrammatic) 
We have prepared sample for your requirement and have attached the sample for your reference. You can download the same from the below link. 

Przemyslaw Kolodziejski
Replied On June 1, 2017 10:02 AM UTC

Thanks !!!
Best solution for Lenovo Yoga Book is DataTable

Sivaraman Sivagurunathan [Syncfusion]
Replied On June 5, 2017 03:16 AM UTC

Hi Przemyslaw Kolodziejski,   
Thanks for the update.

Please let us know if you require further assistance on this.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon