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

SfDataGrid looping on load of data

I'm trying to get the Xamarin datagrid control to work in a cross platform application. The problem I'm experiencing is that when the data property TestId is being set the raise property changed event iscontinuously firing causing a loop. Not sure how to fix... Please help.

Here are some screen shots of my application:
TestInfo.XAML:
Model: TestInfoCS
View Model: TestInfoViewModel
VS Info:




3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team February 11, 2019 12:48 PM UTC

Hi Paul, 
 
Thank you for contacting Syncfusion support. 
 
Currently, we are analyzing on query with DataGrid in Xamarin.Forms. We will validate and let you the details in one business day (February 12, 2019). We appreciate your patience until then.  
 
Regards,
Subburaj Pandian V  



PD Paul Dietz February 11, 2019 02:26 PM UTC

Thanks....

In the previously provided screen shoots INotifyPropertyChanged is commented out.  I was trying to debug the looping of the set TestId property, but the set still loops even with INotifyPropertyChanged commented out.

namespace TestITMobileApp.Model

{

    public partial class TestInfoCS : INotifyPropertyChanged

    {



SP Subburaj Pandian Veluchamy Syncfusion Team February 12, 2019 11:26 AM UTC

 
Hi Paul, 
  
Thank you for your patience. 
 
Based on the provided information, we have checked the reported issue with DataGrid in Xamarin.Forms, in your Model Class file (TestInfoCS) you have defined CLR property TestId wrongly. You have set TestID instead of testID. Please refer the following code example for the same. 
  
You have defined as following 
Define CLR property like this 
public int TestID 
{ 
    get 
    { 
        return testId; 
    } 
    set 
    { 
        this.TestID = value; 
        RaisePropertyChanged("TestID"); 
    } 
} 
public int TestID 
{ 
    get 
    { 
        return testId; 
    } 
    set 
    { 
        this.testID = value; 
        RaisePropertyChanged("TestID"); 
    } 
} 
  
We also attached the sample for your reference, 
  
 
Please let us know, if you need any further assistance on this. 
 
Regards,
Subburaj Pandian V  


Loader.
Live Chat Icon For mobile
Up arrow icon