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

Tabstrip LoadContentFrom cause #grid.data("kendoGrid") is undefined

2 Answers 224 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
lucerias
Top achievements
Rank 1
lucerias asked on 21 Apr 2016, 09:33 PM

I have two grid views that performs pop up custom template editing, grid two is placed under tabstrip, please refer to following code:

        @(Html.Kendo().TabStrip()
                .Name("tabstrip")
                .Animation(animation => 
                    animation.Open(effect => 
                        effect.Fade(FadeDirection.In)))
                .Items(tabstrip =>
                {
                    tabstrip.Add().Text("Details")
                        .Selected(true)      
                        .LoadContentFrom(@Url.Action("Index", "AppGroup", new { AppID = ViewBag.AppID, AppName = ViewBag.AppName }).ToString());
                })
            )

If i change LoadContentFrom to Content, all functions working fine. However, i need to use LoadContentFrom due to heavy content load. once i change it back to LoadContentFrom, when i try to edit grid one, the following error is thrown.

VM37552:50 Uncaught TypeError: Cannot read property 'editRow' of undefined

 

I have investigated further and found out it is becaues of #grid.data("kendoGrid") is undefined and hence it breaks $("#Group").data("kendoGrid").editRow($(this)).

 

Thanks.

2 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 25 Apr 2016, 10:27 AM
Hi,

Please make sure that the controller returns a partial view.

Regards,
Hristo Valyavicharski
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
lucerias
Top achievements
Rank 1
answered on 25 Apr 2016, 04:06 PM
Yes, return as partial view fixed my problem, it is because if we return as normal view, js file import and styling section would be called again and this would cause conflict in the page.
Tags
TabStrip
Asked by
lucerias
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
lucerias
Top achievements
Rank 1
Share this question
or