Hi.
I would like to open multiple popup windows from ActionLinks within a grid.
The column template for the single-column grid is such...
string Template =
"<tr>" +
"<td>" +
"<div class='ResultListing'>" +
"<div class='Technical'>" +
Ajax.ActionLink("#:CompanyName#, #:MfgModelNumber#", "GetDetails", "Services", new { ComponentID = "#:ComponentID#" },
new AjaxOptions() { HttpMethod = "POST" }, new { @class = "ResultsTitle" }) + "<br />" +
"<span>MPN: #:MfgPartNumber#</span><br/>" +
"<span>Key: #:ConfigurationKey#</span><br/>" +
"</div>" +
"<div class='Space'>" +
"</div>" +
"<div class='Technical'>" +
"<span>Description: #:DesignDescription#, #:CategoryDescription# </span><br/>" +
"<span>Elastomers: #:(Elastomers == '0') ? 'N/A' : Elastomers#; Materials: #:(Materials == '0') ? 'N/A' : Materials#</span><br/>" +
"<span>Sizes: #:(Sizes == '0') ? 'N/A' : Sizes#; </span><br/>" +
"<span>Configuration: #:Configurations# </span><br/>" +
"<span>Leyla ID: #:ComponentID# (#:ComponentStatus#)</span>" +
"</div>" +
"<div id='PictureDiv' class='ControlAndLabel AlignCenter'>" +
"# if (URL.length > 0) { #" +
"<img src='#:URL#' class='ComponentImg'/><br/>" +
"<span>#:ImageDescription#</span>" +
"# } else { #" +
" " +
"# } #" +
"</div>" +
"</div>" +
"</td>" +
"</tr>"
;
The Ajax.ActionLink should be able to open a new popupwindow based on the ID contained in the grid for that row. The controller will return a partial view to the popup window...
[HttpPost]
public PartialViewResult GetDetails(int ComponentID)
{
PartialViewResult Result = PartialView("_ComponentDetailView", ComponentID);
return (Result);
}
The popup windows are not modal, so that multiple popups can be opened at the same time. The user can click multiple links from the grid, popping up multiple detail windows at the same time.
The detail popups should fetch data from a database only when activated.
I am rather new to MVC and to the Kendo tools. At this point, I am not even sure this is the best way to do it. I am hoping a new Kendo Window can be instantiated by clicking the Action link in the grid and populated by somehow passing in the id of the object whose details the user wants to see.
Any help would be appreciated.