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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to clear all data from grid?

Thread ID:

Created:

Updated:

Platform:

Replies:

150965 Jan 26,2020 06:09 AM UTC Feb 3,2020 04:59 AM UTC Blazor 3
loading
Tags: Grid
ebi torabi
Asked On January 26, 2020 06:09 AM UTC

How to clear all data from grid dynamically?

Renjith Singh Rajendran [Syncfusion]
Replied On January 27, 2020 06:39 AM UTC

Hi Ebi, 

Thanks for contacting Syncfusion support. 

Based on your requirement, we suggest you to clear the value for the variable assigned for the DataSource property. We have prepared a sample based on this requirement. Please download the sample from the link below, 
 
Please use the code below, 

 
<EjsButton @onclick="ButtonClick">Empty The Grid</EjsButton> 
 
<EjsGrid DataSource="@Orders"> 
    ... 
</EjsGrid> 
 
@code{ 
    ...     
    public void ButtonClick() 
    { 
        Orders = new List<Order>(); 
    } 
} 


 
Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


ebi torabi
Replied On February 1, 2020 06:50 AM UTC

Hi Renjith Singh Rajendran..Thank you very much. it work well.

Renjith Singh Rajendran [Syncfusion]
Replied On February 3, 2020 04:59 AM UTC

Hi Ebi, 

Thanks for your update. 

We are happy to hear that you have achieved your requirement. 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


CONFIRMATION

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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon