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

Null object reference exception

Thread ID:

Created:

Updated:

Platform:

Replies:

146300 Jul 30,2019 11:47 AM UTC Aug 19,2019 01:29 PM UTC WinForms 5
loading
Tags: SfDataGrid
Cosyspro
Asked On July 30, 2019 11:47 AM UTC

Hello Syncfusion,
When I click on icon Filter in SFDataGrid (filter icon in the column head) the application throws the null reference exception.
I initialized the SFDataGrid Filter as following and before set DataSoure to my data list.

            SfDataGrid.AllowFiltering = true;
            SfDataGrid.ShowRowHeader = true;
            SfDataGrid.FilterPopupMode = Syncfusion.WinForms.GridCommon.FilterPopupMode.Both;

NB: I use Version 17.1.0.38

Best regards 

Farjana Parveen Ayubb [Syncfusion]
Replied On July 31, 2019 09:24 AM UTC

Hi Cosyspro, 
 
Thank you for using Syncfusion controls. 
  
We have analyzed your query to enable the filter before setting the DataSource. We have prepared simple sample based on the provided information but we are unable to reproduce the reported issue from our end. Please find the sample and video from the link below 
  
  
  
If still you are facing the same issue, please revert us with the modified sample. It will helps us to investigate further and provide appropriate solution at earlier. 
  
Regards, 
Farjana Parveen A 


Cosyspro
Replied On July 31, 2019 02:20 PM UTC

Hi Farjana,
Thank you for your response.
I used your example and it works fine. However, I integrated your example in my project without modification source code. When I click on filter icon of your example sometimes work fine and sometimes the application throws the following exception "object reference not set to an instance of an object". See the below image showing the exception.
There is conflict between SfDataGrid and other components ?

Information: 
1) I use SfDataGrid since the version 16.4.0.42 and I update my project by Project Migration (your tool in Essential Studio) each time there is update of your product
2) The problem has occurred since the version 17.1.0.38

Regards
Cosyspro  

Attachment: errorSfDataGridFilter_11f9c3bd.zip

Farjana Parveen Ayubb [Syncfusion]
Replied On August 1, 2019 09:34 AM UTC

 
Hi Cosyspro, 
 
Thank you for your update. 
 
We have analyzed your stack trace and tested the application in your Syncfusion version but the issue is not reproduced on our end. Could you please share the details, whether did you customize the GridFilterControl in your application? If so, please share that code or simple sample to replicate the issue that will help us to provide the better solution. 
 
Regards, 
Farjana Parveen A 


Cosyspro
Replied On August 16, 2019 08:11 AM UTC

Hi Farjana,
Thank you for your response.
After long time of investigation and researsh, I found the source of exception. The problem commes from the Localization. So, when I exclure  Syncfusion.SfDataGrid.WinForms.resx from the project, the filter works without exception.
Can you verify the contnent of the Syncfusion.SfDataGrid.WinForms.resx ?

Best regards

Attachment: Resources_d69258d0.zip

Shobika Palani [Syncfusion]
Replied On August 19, 2019 01:29 PM UTC

Hi Cosyspro, 

Thanks for your update. 

On analyzing based on the provided update, it seems that you are using localization in your application. And we suspect that you might not included updated default resource file of SfDataGrid. And we have prepared simple sample with the updated resource file and filtering is working fine at our end.  

Please find sample for the same from the link below 

Sample Link: 

Further, we are facing issue in text rendering for “ok” and “cancel” buttons shown in FilterPopup in the version 17.1.0.38. We are now validating this issue from our end and we will update you with more details on 21st August,2019. 

We will appreciate your patience until then. 

Regards, 
Shobika. 


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