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

How to remove and clear entire records from SfDataGrid?

Thread ID:





131509 Jul 14,2017 02:21 AM UTC Jul 14,2017 06:12 AM UTC Xamarin.Forms 1
Tags: SfDataGrid
Gangatharan Baskaran
Asked On July 14, 2017 02:21 AM UTC

I'm using SfDataGrid in Xamarin forms and I want to clear the entire records from the SfDataGrid. Basically, I want to make the grid empty again. How can I do that in C#?

Ashok N [Syncfusion]
Replied On July 14, 2017 06:12 AM UTC

Hi Gangatharan, 

Thanks for contacting Syncfusion support. 

You can achieve your requirement by clearing the Binding ItemsSource. Please refer the below code example : 

    <local:ViewModel x:Name="viewModel" /> 

<sfgrid:SfDataGrid x:Name="dataGrid"  
            ItemsSource="{Binding OrdersInfo}" > 

private void ClearRecords_Clicked(object sender, EventArgs e) 
    // Clear the records from view 



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