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

how to clear the binding of sfdatagrid.itemsource property

I am setting the item sourceproperty of sfdatagridas shown below: I use this code in Refresh button click.
datagrid.Itemsource = dtData.Defaultview;
But every time I click the refresh button. the same rows are added to the existing rows in the sfdatagrid. Is there a way I could remove the item source binding. like. datagrid.Itemsource = null; this works fine in .net defaultWPF datagridbut not with sfdatagrid.
Please give your suggestions

1 Reply

JG Jai Ganesh S Syncfusion Team July 4, 2017 01:18 PM UTC

Hi Nirmal, 
We cannot understand your requirement clearly but we suspect that you want to refreshing the SfDataGrid ItemsSource. We have created in a simple sample for refreshing the ItemsSource while using DataTable but it working fine in our end. 
In the above sample, we bound the ItemsSource in xaml and then add a new ItemsSoure and setting null through button click. 
Could you please check the above sample and still if you got the issue then please share the more details about your issue? This would be more helpful for us to proceed further. 
Jai Ganesh S 

Live Chat Icon For mobile
Up arrow icon