This question is locked. New answers and comments are not allowed.
I am trying to do something I would think is fairly simple, but I can't seem to get around it.
Here's the scenario:
I have a partial view that consists of a table and content within that table and I am loading that into a TabStrip using .LoadContentFrom...
Within one of the table rows in an ActionLink to open a modal window.
Now, if I include the EXACT same Html.ActionLink in the page outside the TabStrip, the modal dialog opens just fine. But the link simply will not work when rendered as part of the TabStrip content. I also tried taking the PartialView out of the equation and using .Content to render the link and that still doesn't work. The table is wrapped in a DIV and I also tried wrapping just the actionlink in a DIV in the attempt to render it alone within the TabStrip content to no avail.
Does anyone have any suggestions on what to try next, or is there something obvious I am clearly missing here?
CORRECTION:
Ok, THIS works. So the problem does appear to be limited to rendering a partial view using LoadContentFrom. That makes me suspect the ScriptRegistrar comes into play to register the .js file that contains my dialog code?
UPDATE:
This also works:
Here's the scenario:
I have a partial view that consists of a table and content within that table and I am loading that into a TabStrip using .LoadContentFrom...
Html.Telerik().TabStrip()
.Name("QuoteDetailTabStrip")
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Detail")
.LoadContentFrom("DetailView", "Quote");
Within one of the table rows in an ActionLink to open a modal window.
<td>(@Html.ActionLink(
"edit"
,
"OEM"
,
"Quote"
, routeValues:
new
{ id =
"P722161"
}, htmlAttributes:
new
{ id =
"oemEditLink"
, data_dialog_title =
"OEM List"
}))</td>
Now, if I include the EXACT same Html.ActionLink in the page outside the TabStrip, the modal dialog opens just fine. But the link simply will not work when rendered as part of the TabStrip content. I also tried taking the PartialView out of the equation and using .Content to render the link and that still doesn't work. The table is wrapped in a DIV and I also tried wrapping just the actionlink in a DIV in the attempt to render it alone within the TabStrip content to no avail.
Does anyone have any suggestions on what to try next, or is there something obvious I am clearly missing here?
CORRECTION:
Ok, THIS works. So the problem does appear to be limited to rendering a partial view using LoadContentFrom. That makes me suspect the ScriptRegistrar comes into play to register the .js file that contains my dialog code?
Html.Telerik().TabStrip()
.Name(
"QuoteDetailTabStrip"
)
.Items(tabstrip =>
{
tabstrip.Add()
.Text(
"Detail"
)
.Content(@<text><div>@Html.ActionLink(
"edit"
,
"OEM"
,
"Quote"
, routeValues:
new
{ id =
"P722161"
}, htmlAttributes:
new
{ id =
"oemEditLink"
, data_dialog_title =
"OEM List"
})</div></text>);
UPDATE:
This also works:
Html.Telerik().TabStrip()
.Name(
"QuoteDetailTabStrip"
)
.Items(tabstrip =>
{
tabstrip.Add()
.Text(
"Detail"
)
.Content(@<text> @Html.Partial(
"_Detail"
) </text>);