This is a migrated thread and some comments may be shown as answers.

RadDomainDataSource failing to filter with null value

7 Answers 14 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
Shikha
Top achievements
Rank 1
Shikha asked on 03 Jun 2014, 03:00 PM
Hi,

I am using Telerik 2013 Q3 and I have changed RadGridView to use RadDomainDataSource instead of DomainDataSource control . After making this change filtering on the columns is throwing exception 'Load operation failed for query. Object reference not set to an instance of object'. This exception is only thrown if the list of values for column has one or more null value. Filtering works fine on grid columns where data is not null. Is there a solution or a work around for this issue?

Thanks,
Shikha

7 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Jun 2014, 08:40 AM
Hello Shikha,

The error message says there is a problem with executing the "GetTransactionEventsForRoute" query due to a null reference exception.

Are you able to successfully execute the same query with null values on the server? If so, may I also ask you to test with DomainDataSource?

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Shikha
Top achievements
Rank 1
answered on 04 Jun 2014, 10:12 AM
Hello Didie,

Thanks for your reply.

"GetTransactionEventsForRoute" query runs successfully on the sever. I have also tested the same query against the DomainDataSource and filter works fine with null values in the Driver Column. See the attached screen shot.

The grid displays list of records from Transaction Event table. Transaction Event table has 0 to 1 association with Driver table. Driver Name Column that is shown in the grid as Driver is a field on the Driver sub entity which in this case is null. Column filtering on the RadGridView with RadDomainDataSource fails to work and throws exception when the sub entity is null.

Regards,
Shikha







0
Dimitrina
Telerik team
answered on 04 Jun 2014, 02:00 PM
Hello Shikha,

Thank you for performing this additional test. Would you also try subscribing for the LoadedData event and implement the suggested in the error message? Does it work fine except the exception?

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Shikha
Top achievements
Rank 1
answered on 04 Jun 2014, 03:48 PM
Hello Didie,

I have added in the code to subscribe for the LoadedData and have called LoadedDataEventArgs.MarkErrorAsHandled(). By adding this it is just avoiding to display as the exception is being marked as handled. Please see the attached file HandledError.png

Filter doesn't work at all. For example - If grid had 20 records before filtering on filtering it doesn't display any records. Please see the attached file BeforeFiltering.png and AfterFiltering.png.

Regards,
Shikha
 

 

 
0
Dimitrina
Telerik team
answered on 05 Jun 2014, 09:08 AM
Hello Shikha,

I tested the same scenario locally and I was not able to reproduce any issue.
I filled RadGridView with data from the Customers table in the Northwind database after I had set some of the ContactName's values to be NULL. Then I filtered on the null values and it worked fine. I also tried filtering on the values in the Region column.

I have attached my test solution as a reference. You just need to connect to the Northwind database. Then, the Region column has some NULL values to filter on.

May I ask you to modify my solution so that I can observe the problem?

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Shikha
Top achievements
Rank 1
answered on 06 Jun 2014, 09:47 AM
Hi Didie,
Thanks for your help.

I have modified the project such that it matches the issue that I am getting. But I can't attach .zip file to the post. Please let me know how can I do that. Getting this error.

Attach Files 

The selected file(s) cannot be attached because it may exceed the maximum attachment size (2 MB) or is from not allowed type (allowed: .jpg, .jpeg, .gif, .png).


0
Dimitrina
Telerik team
answered on 06 Jun 2014, 09:51 AM
Hello,

You should open a support thread and attach the solution there.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
DomainDataSource
Asked by
Shikha
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Shikha
Top achievements
Rank 1
Share this question
or