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

Error in production but not in dev.

4 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dustin
Top achievements
Rank 1
Dustin asked on 28 Oct 2015, 06:07 PM

I am running into an issue when trying to bind a detail grid.

It works fine on my dev machine, but when I publish the project and run it on the production environment, I get the attached error.

The only difference I can think of is the size of the data that is coming across. Obviously production has a lot more data than my dev machine does. Any Ideas?

 ​

4 Answers, 1 is accepted

Sort by
0
Dustin
Top achievements
Rank 1
answered on 28 Oct 2015, 06:26 PM

OK it has to be something to do with the amount of data.

It would appear that if I have only a few entries for my detail grid, it works fine, but if I have a lot of entries it has the error.

Any Ideas?

0
Pavlina
Telerik team
answered on 29 Oct 2015, 01:35 PM
Hello,

Unfortunately from the stack trace we cannot understand what is causing the error in your case. It will be best if you could isolate the behavior in a runnable example which we can debug locally in order to assist you further.
 
Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dustin
Top achievements
Rank 1
answered on 29 Oct 2015, 04:10 PM

OK I have figured out what the issue was.

I had a ViewModel that had another model in it that was coming back as null. I put an inline if to check for null to fix the issue.

Hope this can help anyone running into the same issue:

 

Location = usr.Location.HasValue ? usr.Location.Value : default(int),
Loc = usr.Location.HasValue ? new LocationViewModel()
{
   ID = usr.Locations.ID,
   Name = usr.Locations.Name,
   Enabled = usr.Locations.Enabled
} : new LocationViewModel(),

0
Pavlina
Telerik team
answered on 02 Nov 2015, 04:20 PM
Hello,

Thank you for sharing your findings with the community.

Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Dustin
Top achievements
Rank 1
Answers by
Dustin
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or