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

[Solved] Bug Report: BeginInsert method causes null exception

5 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex Fan
Top achievements
Rank 1
Alex Fan asked on 29 Nov 2010, 03:27 AM
Hi

What I am talking about is something in "http://blogs.telerik.com/rossenhristov/posts/10-03-24/pure_server-side_filtering_with_radgridview_and_wcf_ria_services.aspx". This issue is already reported by someone in telerik forum when I googled, but the insteresting thing is I cannot find it in telerk forum anymore, it is deleted for some reason. This is the google cache:"http://webcache.googleusercontent.com/search?q=cache:8sYcwxpyEYIJ:www.telerik.com/community/forums/silverlight/gridview/null-reference-exception-when-calling-updatelayout-with-q3-2010-release.aspx+radgridview+updatelayout+null+exception&cd=1&hl=en&ct=clnk&gl=au"

Regarding to the telerik reply, I understand telerik will not support code from a blog. But this a chance to spot issues, isn't it? Anyway, what I am going to say is, that issue happens when a gridview's itemssource is updated and that gridview is in a popup. In the case in the blog, it is in a popup as another gridview's custom filter control.

I will appreciate it if you can spend sometime going through the code in blog. Thanks a lot.

Regards
Alex

5 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 01 Dec 2010, 02:34 PM
Hello Alex Fan,

Could you provide me some more info about your scenario? I need some information like type of the data source to which RadGridView is bound to, and any information which you could find useful.

Greetings,
Nedyalko Nikolov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Alex Fan
Top achievements
Rank 1
answered on 02 Dec 2010, 12:10 AM
Hi

Thanks for the reply. Sorry, I really couldn't find anything that is different between our case and the one in blog. We all using RIA, so the RadGridView (GridA) is bound to DomainDataSource (DDS). And the FilterDescriptors of DDS is bound to the RadGridView (GridB) which is in custom filter control. This filter control is applied to each column of GridA.

The problem is, when we call GridB.BeginInsert(), it fires up grid event "AddingNewDataItem". In the event handler, we set GridViewAddingNewEventArgs.NewObject to be a new FilterDescriptors that we already setup according what we need to filter. After this handler, GridB has a row to display and Items property already has 1 item. But when we calls GridB.UpdateLayout() immediately after BeginInsert(), a null reference exception is thrown. Event if we dont call UpdateLayout(), it will still throw same exception when time comes to render and display GridB, which is effectively the same as calling UpdateLayout(). But keep in mind that calling BeginInsert is a very normal task of RadGridView which should not fail in normal cases, I personally suspect that was because the filter control that contains GridB is sitting in a popup of GridA after we click on funnel.

I hope my explaination is not too confusing.

Regards,
Alex
0
Nedyalko Nikolov
Telerik team
answered on 07 Dec 2010, 11:09 AM
Hello Alex Fan,

I've managed to simulate the issue with binaries from the official release (aka 2010.Q3). This issue has been fixed already with the latest internal build (uploaded last night 6 Dec 2010). I'm attaching my sample application for a reference. Let me know how it works on your end.

Best wishes,
Nedyalko Nikolov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Alex Fan
Top achievements
Rank 1
answered on 23 Dec 2010, 04:38 AM
Hi

Thanks a lot for that. Could we know when is the next offical release please? This is because we are more towards using the release build. Thanks

Alex
0
Vlad
Telerik team
answered on 23 Dec 2010, 10:09 AM
Hi,

 Our official service pack will be released before the end of this week. 

Regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Alex Fan
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Alex Fan
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or