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

[Solved] Possible bug in deprecated "OnRowSelected"?

2 Answers 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Joan Vilariño
Top achievements
Rank 2
Joan Vilariño asked on 17 Sep 2010, 10:43 AM
Hello.

I was having an applicationwide error "StackOverFlowError" when loading dynamically grids inside a <div> using ajax. This happened without any change to the code by my side, so I was suspecting it had something to do with Telerik.

Finally I found the cause... I was using the deprecated "OnRowSelected" event in my grids. When I have changed it to OnRowSelect it works flawless...

Being a deprecated method, is not as important as another bugs, but I post this so you are aware that it can break "legacy" forms like the ones I was using. I had to go all through my solution to change OnRowSelected calls to the new OnRowSelect.

Here is the code that crashes the view:

.ClientEvents(events => events
    .OnRowDataBound(() => { %>
                 function(e) {
                   PopupRowDataBound("idCentroServicio",e);
                 } <%
     })
     .OnRowSelected(() => { %>
                 function (e) {
                   PopupRowSelected(e,"idCentroServicio",'<%=Model.Controller %>','<%=Model.Action %>','<%=Model.CallBack %>');
                 } <%
     })

I hope it helps to fix it

Cheers

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 17 Sep 2010, 10:51 AM
Hi Joan VilariƱo,

Indeed there was a recursive call in the deprecated method:

[Obsolete("Use OnRowSelect instead")]
public GridClientEventsBuilder OnRowSelected(Action onRowSelectedInlineCode)
{
      return OnRowSelected(onRowSelectedInlineCode);
}
should be

[Obsolete("Use OnRowSelect instead")]
public GridClientEventsBuilder OnRowSelected(Action onRowSelectedInlineCode)
{
      return OnRowSelect(onRowSelectedInlineCode);
}


I have fixed this bug. Your Telerik points have been updated.

Regards,
Atanas Korchev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 05 Oct 2010, 08:41 PM
Indeed, I was just about to post this bug.
Tags
Grid
Asked by
Joan Vilariño
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
John
Top achievements
Rank 1
Share this question
or