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

Pass value to controller

1 Answer 141 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Suzanne
Top achievements
Rank 1
Suzanne asked on 26 Sep 2016, 05:22 PM

    @(Html.Kendo().PanelBar()
          .Name("ICAPTeamContentPanelBar")
          .ExpandMode(PanelBarExpandMode.Single)
          .Items(panelbar =>
          {
              panelbar.Add()
                  //.Action("Membership", "ICAPTeam").Data("getentityId")
                  
                  .LoadContentFrom("Membership", "ICAPTeam", new { entityid = 18 })
                  .HtmlAttributes(new { id = "ictMembership", @class = "PanelBarFont" })
                  .Text("Membership");
              panelbar.Add()
                  .LoadContentFrom("AgentResult", "ICAPTeam")
                  .HtmlAttributes(new { id = "ictAgent", @class = "PanelBarFont" })
                  .Text("Agent Association");
              panelbar.Add()
                  .LoadContentFrom("Proxy", "ICAPTeam")
                  .HtmlAttributes(new {id = "ictProxy", @class = "PanelBarFont"})
                  .Text("Proxy");
              panelbar.Add()
                  .LoadContentFrom("Contacts", "ICAPTeam")
                  .HtmlAttributes(new {id = "ictContacts", @class = "PanelBarFont"})
                  .Text("Contacts");
          })
          )

 

Given this panelbar how can I set the value of entityid using JS?

Why don't the action and loadcontentfrom panelbar methods have a data property that allow setting parameters for the controller action?

 

 

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 28 Sep 2016, 12:43 PM
Hi Travis,

As I mentioned in the support ticket that you have opened on the same topic, the ​LoadContentFrom action of the PanelBar does not take data parameter (or data function) because of the nature of the widget. The PanelBar is considered to be a navigation widget, while the data functions are usually implemented for editors and data management widgets.

In case you have any further questions, I would suggest you to continue this discussion in the support ticket and close this forum thread.

Regards,
Veselin Tsvetanov
Telerik by Progress
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
Tags
PanelBar
Asked by
Suzanne
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or