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

how to clear the binding of sfdatagrid.itemsource property

Thread ID:

Created:

Updated:

Platform:

Replies:

131292 Jul 3,2017 02:06 PM UTC Jul 4,2017 01:18 PM UTC WPF 1
loading
Tags: SfDataGrid
Nirmal Kumar Andrews
Asked On July 3, 2017 02:06 PM UTC

Hi,
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

Jai Ganesh S [Syncfusion]
Replied On 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. 
Regards, 
Jai Ganesh S 


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.

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

;