Hi all
Another user here trying to achieve a simple task. I have read all the posts here and even though I know I am missing something simple,
I cannot find an answer to this issue. I get a little hopeless when I see so many answered questions here...anyways..
The goal is to display a Chart in a popup window. The Chart IS displayed but ONLY once.
The partial View is NOT being called so the NEW data with the NEW parameters is NOT being fetched.
Here is my code:
public class NormalModeController : Controller
{
... some code here
public PartialViewResult _ChartBottom(string upgradeDate, string name)
{
return PartialView("_ChartBottomData", GetUpdatedData(upgradeDate, name));
}
VIEW: (this will load only ONCE)
<div id="linkBottomGraph-region">
@{ Html.Telerik().Window()
.Name("WindowBottomGraph")
.Visible(false)
.Scrollable(true)
... ommited some code here blah blah blha
.Buttons(b => b.Refresh().Maximize().Close())
//.LoadContentFrom("_ChartBottom", "NormalMode", new { upgradeDate = ViewData["UpgradeDate"], name = ViewData["name"] })
.LoadContentFrom(Url.Action("_ChartBottom", "NormalMode", new { upgradeDate = ViewData["UpgradeDate"], name = ViewData["name"] }))
.Render();
}
</div>
<script type="text/javascript">
function openBottomWindow() {
var window = $("#WindowBottomGraph").data("tWindow");
window.ajaxRequest("#linkBottomGraph-region", "NormalMode/_ChartBottom/"); //this calls the whole page, not the partial HTML...weird
window.open();
}
</script>
PARTIAL VIEW:
@model IEnumerable<ViewModels.NormalMode.MyModelTest>
@(Html.Telerik().Chart(Model)
.Name("Grid1")
... omitted some code here blah blah
//.DataBinding(dataBinding => dataBinding.Ajax().Select("_ChartBottomData", "NormalMode")
//)
.HtmlAttributes(new { style = "width: 1000px; height: 300px;" })
)
Any ideas?
Thank you