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

[Solved] RadGrid no longer supports null or DBNull value.

3 Answers 268 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jignesh
Top achievements
Rank 1
Jignesh asked on 30 Apr 2013, 10:31 PM

We recently upgraded our controls to the Q1 2013 SP2 assembly from 2011 0519. In making this change, we have noticed some significant changes to the way that some of the controls function.
• One of those issues is that the RadGrid control no longer accepts null or DBNull.Value in the DataFields. Changing the underlying data sets to return non-null values is not an immediate option for us since our solution is simply too large to identify all the places where that could be happening. We have been starting the process of re-working some of our pages to do this, but we have several hundred pages/user controls that need to be checked. In the meantime we need to find a work around to make the controls work similarly to the way they used to.
• The other issue is that the Visible=false property on a bound column is no longer maintaining ViewState properly. We know that we can change the Visible to Display and effectively get the old behavior, but there are many places where this was used.
We’ve been seeing other issues, but have not determined if they are due to a change in the Telerik controls or due to a recent upgrade to the latest jQuery library. Can you please at least help us to resolve these two issues?
Kindly let me know if you need any additional information.
Thanks.


3 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 03 May 2013, 02:17 PM
Hi Jignesh,

The grid still supports null and DBNull, you can actually test this in our online demos for example this one:
http://demos.telerik.com/aspnet-ajax/grid/examples/automaticoperations/efdatabinding/defaultcs.aspx

Use the Display property instead of the Visible for hiding the columns if you need they to be persisted in the ViewState. Check this forum thread for more information:
http://www.telerik.com/community/forums/aspnet-ajax/grid/breaking-change-hidden-column-cell-text-is-not-persisted-in-viewstate.aspx

Regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jignesh
Top achievements
Rank 1
answered on 03 May 2013, 09:41 PM
Thanks Vasil for your prompt reply!!!!

It turned out that the issue is with the GridGroupByField of the RadGrid,when we are passing NULL values to it,we are getting the following exception as mentioned below:

Is that the NULL values are not supported in Q1 2013 SP2 Release?

We had this working with 2011 0519 Release.

Thanking you.

1) Exception Information
*********************************************
Exception Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Data: System.Collections.ListDictionaryInternal
TargetSite: Boolean
0
Vasil
Telerik team
answered on 08 May 2013, 11:03 AM
Hi Jignesh,

The difference between Q2 2011 and Q2 2012 that may effect you is that the Grouping is implemented with LINQ in the later versions by default.
http://blogs.telerik.com/blogs/posts/11-11-08/super-charged-performance-optimizations-for-telerik-s-asp-net-ajax-grid-in-q3-2011.aspx
You can turn this feature off by setting MasterTableView.EnableLinqGrouping=false. And see if there is any difference.

Regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Jignesh
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Jignesh
Top achievements
Rank 1
Share this question
or