Plain and simple, what's the proper way to do this without running into issues?

  • I have a a RadGrid, which will be populated with data at some point during the page's life-cycle. Likely after a button click on the page.
  • I have a RadWindowManager defining my windows' attributes.
  • I want to create and open a window based on data from the table.

My initial thought was doing

<ClientSettings EnablePostBackOnRowClick="true">
    <Selecting AllowRowSelect="true" />
    <ClientEvents OnRowClick="OnRowClick" />

for my RadGrid settings. But I'm lost on how to get the client to open a new window (Telerik states that RadWindow and RadWindowManager are client-side controls), while also getting the server-side to access my business logic for populating the window with data - also selecting the right type of UserControl to stick in the window.

JavaScript inside my RadScriptBlock:

var windowManager = $find("<%= WindowManager_PopIns.ClientID %>");
function OnRowClick(sender, eventArgs) {
  if(windowManager != null) {
    var grid = sender;
    var MasterTable = grid.get_masterTableView();
    var row = MasterTable.get_dataItems()[eventARgs.get_itemIndexHierarchical()];
    var cell = MasterTable.getCellByColumnUniqueName(row, "ID");

    if (cell != null) {
      var windowURL = ""; // ??? I want the URL to be a UserControl with a query string maybe?
      var windowID = cell; // I think this should get the ID as the window's name
      var newWindow = , windowID);
      newWindow.set_title("SomeName" + " " + "SomeIdentifier");

This is what I currently have. My main issue, like stated, is that I don't know how to populate this window after creation or opening.
Bonus: How can I do this so that the page with this manager and graph can be used as a sort of master page, allowing "child" pages that would define what goes in the title, what data/columns go in the grid, and what to load in the actual window?

Related posts

Recent Viewed