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

[Solved] LoadContentFrom pass parameter

4 Answers 621 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jose Granja
Top achievements
Rank 1
Jose Granja asked on 04 Dec 2009, 04:44 PM
Hi,

I'm using tabstrip and the tabs are loaded on demand using LoadContentFrom. How can I pass a parameter through LoadContentFrom.

At the moment I have

LoadContentFrom("PatientBilling", "Patient");  


but I would like to do something like that

LoadContentFrom("PatientBilling", "Patient", new { ID = 14 } ); 



Also I have a Grid in one of the partial views rendered but it's not working properly. It's layout correctly but I doesn't make the calls to the server. There nothing work with the definition beacuse it already tried in the main page and it works. Do I have to load again all the jquery libraries in the partial view? At the moment it is like this:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 
<%@ Import Namespace="YYYYYY"%> 
<%@ Import Namespace="XXXX"%> 
 
<%= Html.Telerik().Grid<Log>() 
        .Name("Grid") 
        .EnableCustomBinding(true) 
        .Columns(columns => 
        { 
            columns.Add(o => o.Description).Width(200); 
            columns.Add(o => o.EventDataColumn); 
            columns.Add(o => o.EventDataBefore); 
            columns.Add(o => o.EventDataAfter); 
            columns.Add(o => o.DateCreated).Format("{0:dd/MM/yyyy}").Width(120); 
        }) 
        .Pageable(paging =>  
                paging.Total((int)ViewData["total"]) 
                      .Style(GridPagerStyles.NextPreviousAndNumeric) 
                      .PageSize(20) 
                ) 
        .Ajax(ajax => ajax.Action("PatientLogs", "Logs" , new { ID = ((Patient)ViewData["Patient"]).ID })) 
        .Scrollable(scrolling=>scrolling.Height(400)) 
        .Sortable() 
 
%> 
 
<br /> 
<br /> 
 


thank you


4 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 07 Dec 2009, 09:44 AM
Hello Jose Granja,

Currently the LoadContentFrom method does not support parameters. I have added this as a feature request and it will be implemented soon.


As for the second problem - you need to register the grid javascript files in your view (where the panelbar is):

<%= Html.Telerik().ScriptRegistrar().DefaultGroup(group =>
        group.Add("telerik.common.js")
             .Add("telerik.grid.js")
             .Add("telerik.grid.filtering.js"))
        %>

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jose Granja
Top achievements
Rank 1
answered on 07 Dec 2009, 10:53 AM
Thank you! that solved my problem!! I also solved the problem about the param in LoadContent as follows:

.LoadContentFrom(Url.Action("PatientLogs", "Patient", new { ID = ViewData["ID] }));

that works fine me!

cheers,

jose
0
Atanas Korchev
Telerik team
answered on 08 Dec 2009, 08:23 AM
Hi Jose Granja,

 I am glad you found a viable workaround. Still an overload of the LoadContentFrom method will be implemented and is already in our todo list.


Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Craig
Top achievements
Rank 1
answered on 21 Nov 2011, 01:46 PM
Hi
I can confirm this is implemented. I'm using Q3 2011.

Regards
Craig
Tags
TabStrip
Asked by
Jose Granja
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jose Granja
Top achievements
Rank 1
Craig
Top achievements
Rank 1
Share this question
or